diff --git a/Dockerfile b/Dockerfile index 130a4d0..8bf41bb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,9 @@ FROM ubuntu:22.04 +USER root # Update the system, install OpenSSH Server, and set up users RUN apt-get update && apt-get upgrade -y && \ - apt-get install -y openssh-server git sudo udev software-properties-common locales - -# Set the locale -RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \ - locale-gen -ENV LC_ALL en_US.UTF-8 -ENV LANG en_US.UTF-8 -ENV LANGUAGE en_US:en + apt-get install -y openssh-server git sudo udev software-properties-common locales tzdata # Create user and set password for user and root user ARG CODE_PASSWORD @@ -21,6 +15,16 @@ RUN mkdir /var/run/sshd && \ sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd && \ echo "export VISIBLE=now" >> /etc/profile +# Set the locale +RUN ln -s -f /usr/share/zoneinfo/CET /etc/localtime +USER code +RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \ + locale-gen +ENV LC_ALL C.UTF-8 +ENV LANG C.UTF-8 +ENV LANGUAGE en_US:en +USER root + # Expose the SSH port EXPOSE 22