You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
1.0 KiB
Docker
38 lines
1.0 KiB
Docker
FROM ubuntu:22.04
|
|
|
|
RUN useradd -r -s /sbin/nologin -c "Microchip daemon runner" -m libby
|
|
USER root
|
|
|
|
ENV BASE_DIR="/opt/microchip"
|
|
ENV BIN_DIR="${BASE_DIR}/bin"
|
|
ENV INSTALLERS_DIR="${BASE_DIR}/installers"
|
|
ENV LICENSE_DIR="${BASE_DIR}/licenses"
|
|
ENV LOG_DIR="${BASE_DIR}/logs"
|
|
ENV SCRIPTS_DIR="${BASE_DIR}/scripts"
|
|
|
|
ARG DEBIAN_FRONTEND=noninteractive
|
|
RUN dpkg --add-architecture i386 && \
|
|
apt-get update -y && \
|
|
apt-get upgrade -y && \
|
|
apt-get install -y build-essential lsb-core
|
|
|
|
RUN echo "Installer daemons to ${BIN_DIR}..."
|
|
RUN mkdir -p ${LICENSE_DIR}
|
|
RUN mkdir -p ${INSTALLERS_DIR}
|
|
RUN mkdir -p ${BIN_DIR}
|
|
RUN mkdir -p ${SCRIPTS_DIR}
|
|
RUN mkdir -p ${LOG_DIR}
|
|
RUN chown -R libby:libby ${BASE_DIR}
|
|
|
|
USER libby
|
|
|
|
ADD ./scripts/* ${SCRIPTS_DIR}/
|
|
RUN tar -xvf "${INSTALLERS_DIR}/Linux_Licensing_Daemon.tar.Z" -C "${INSTALLERS_DIR}"
|
|
RUN mv ${INSTALLERS_DIR}/Linux_Licensing_Daemon/* "${BIN_DIR}/"
|
|
|
|
|
|
|
|
RUN bash -c "echo \". ${SCRIPTS_DIR}/env\"" >> $HOME/.bashrc
|
|
CMD ["/bin/bash", "-l", "-c"]
|
|
ENTRYPOINT ["/bin/bash", "-l", "-c"]
|