You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
897 B
30 lines
897 B
FROM ubuntu:20.04@sha256:5747316366b8cc9e3021cd7286f42b2d6d81e3d743e2ab571f55bcd5df788cc8
|
|
|
|
ENV LC_ALL=C.UTF-8 LANG=C.UTF-8
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
RUN apt-get update -q && \
|
|
apt-get install -qy \
|
|
git \
|
|
gettext \
|
|
python3 \
|
|
python3-pip \
|
|
python3-setuptools \
|
|
python3-venv \
|
|
faketime \
|
|
&& \
|
|
rm -rf /var/lib/apt/lists/* && \
|
|
apt-get autoremove -y && \
|
|
apt-get clean
|
|
|
|
# create new user to avoid using root; but with sudo access and no password for convenience.
|
|
ENV USER="user"
|
|
ENV HOME_DIR="/home/${USER}"
|
|
ENV WORK_DIR="${HOME_DIR}/wspace" \
|
|
PATH="${HOME_DIR}/.local/bin:${PATH}"
|
|
RUN useradd --create-home --shell /bin/bash ${USER}
|
|
RUN usermod -append --groups sudo ${USER}
|
|
RUN echo "%sudo ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
|
|
WORKDIR ${WORK_DIR}
|
|
RUN chown --recursive ${USER} ${WORK_DIR}
|
|
USER ${USER}
|
|
|