-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
install relevant locales in Dockerfile
- Loading branch information
Showing
1 changed file
with
29 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |