38 lines
971 B
Docker
38 lines
971 B
Docker
FROM ubuntu:24.04 AS ubuntu
|
|
|
|
# setting non-interactive mode for apt
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
# update system and install the required stuff
|
|
RUN apt-get update && apt-get upgrade -y
|
|
RUN apt-get install -y --no-install-recommends \
|
|
gosu
|
|
|
|
# install packages appearing in packages.list
|
|
# clean up chache and remove package lists
|
|
COPY ./packages.list /tmp
|
|
RUN xargs apt-get install -y --no-install-recommends </tmp/packages.list && \
|
|
apt-get clean && \
|
|
rm /tmp/packages.list
|
|
|
|
|
|
# install what can not be installed with
|
|
# package manager
|
|
COPY ./build_time_scripts.sh /tmp
|
|
COPY ./custom /tmp/custom
|
|
RUN /tmp/build_time_scripts.sh /tmp/custom && \
|
|
rm -rf /tmp/build_time_scripts.sh /tmp/custom
|
|
|
|
|
|
# set working dir inside the container
|
|
WORKDIR /home/ubuntu
|
|
|
|
# password to log in as ubuntu user
|
|
ENV SECRET="ubuntu"
|
|
|
|
# copy enrypoint script
|
|
COPY ./entrypoint.sh /usr/bin/entrypoint-docker.sh
|
|
|
|
ENTRYPOINT ["/bin/sh", "/usr/bin/entrypoint-docker.sh"]
|
|
CMD ["/usr/bin/bash"]
|