Skip to content

Commit

Permalink
install relevant locales in Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
phyver committed Jun 7, 2021
1 parent deb07c3 commit 2d89cdb
Showing 1 changed file with 29 additions and 17 deletions.
46 changes: 29 additions & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,38 +1,50 @@
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
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"]

0 comments on commit 2d89cdb

Please sign in to comment.