#--------------------------------------------------------------------------#
# Copyright (c) 2025, Ciena Corporation                                    #
# All rights reserved.                                                     #
#                                                                          #
#     _______ _____ __    __ ___                                           #
#    / _ __(_) ___//  |  / // _ |                                          #
#   / /   / / /__ / /|| / // / ||                                          #
#  / /___/ / /__ / / ||/ // /__||                                          #
# /_____/_/_____/_/  |__//_/   ||                                          #
#                                                                          #
# Distributed as Ciena-Customer confidential.                              #
#                                                                          #
#--------------------------------------------------------------------------#
FROM ubuntu:20.04

# Prepare the base image
RUN apt-get update -y
RUN apt-get upgrade -y
RUN apt-get install systemd -y

# Create Temporary workspace for installation
RUN mkdir -p /tmp
WORKDIR /tmp

# Transfer package,scripts, and certificate config to temp workspace
COPY ponmgr_selfsigned_cert_req.conf /tmp/
COPY tibit-ponmgr_R5.2.0_all.deb /tmp/

# Install debian package
RUN apt-get install ./tibit-ponmgr_R5.2.0_all.deb -y

# Run Apache2
ENTRYPOINT ["/usr/sbin/apache2ctl", "-D", "FOREGROUND"]
