From 2d89cdbe6aba59a8da532554d2e4670c4d80833f Mon Sep 17 00:00:00 2001 From: Pierre Hyvernat Date: Mon, 7 Jun 2021 10:32:57 +0200 Subject: [PATCH] install relevant locales in Dockerfile --- Dockerfile | 46 +++++++++++++++++++++++++++++----------------- 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/Dockerfile b/Dockerfile index cc030b29..b5c418da 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,16 +1,30 @@ from debian:stable +### +# install dependencies RUN apt update RUN apt install --no-install-recommends --assume-yes \ - gettext-base \ + locales \ + gettext \ man-db \ psmisc \ - nano tree \ + nano \ + tree \ bsdmainutils \ x11-apps - RUN rm -rf /var/lib/apt/lists/* +RUN apt clean +RUN rm -rf /var/lib/apt/lists/* -## Set user and group +### +# install locales and set default +RUN sed -i 's/^# *\(en_US.UTF-8\)/\1/' /etc/locale.gen +RUN sed -i 's/^# *\(fr_FR.UTF-8\)/\1/' /etc/locale.gen +RUN locale-gen +RUN update-locale LANG=en_US.UTF-8 +ENV LANG en_US.UTF-8 + +### +# set user and group ARG user=gsh-user ARG group=gsh-user ARG uid=1000 @@ -18,21 +32,19 @@ ARG gid=1000 RUN groupadd -g ${gid} ${group} RUN useradd -u ${uid} -g ${group} -s /bin/sh -m ${user} # <--- the '-m' create a user home directory -## Switch to user +### +# switch to user USER ${uid}:${gid} - WORKDIR /home/${user} -## use the latest github version -# ADD --chown=gsh-user:gsh-user https://api.github.com/repos/phyver/GameShell/tarball GameShell.tgz -# RUN mkdir GameShell -# RUN tar -xzf GameShell.tgz -C GameShell --strip-components 1 -# RUN rm -f GameShell.tgz -# RUN GameShell/bin/archive.sh -# RUN rm -rf GameShell -## if you want to copy a local, customized version, comment the preceeding -## lines and uncomment the next one -COPY GameShell.sh . +### use the latest github version +ADD --chown=gsh-user:gsh-user https://github.com/phyver/GameShell/releases/download/latest/gameshell.sh gameshell.sh + +### if you prefer to use a local customized version, comment the preceeding +### ADD ... +### line and uncomment the next one +### (NOTE that you need to have generated a "gameshell.sh" file with GSH_ROOT/utils/archive.sh +# COPY gameshell.sh . -ENTRYPOINT ["./GameShell.sh"] +ENTRYPOINT ["bash", "./gameshell.sh"]