mirror of
https://github.com/tuxbox-neutrino/docker-buildenv.git
synced 2025-08-26 13:12:42 +02:00
Dockerfile: move useradd after ARGs
This commit is contained in:
10
Dockerfile
10
Dockerfile
@@ -93,6 +93,11 @@ ARG TB_VERSION=${TB_VERSION}
|
|||||||
ARG XDG_CONFIG_HOME=${XDG_CONFIG_HOME}
|
ARG XDG_CONFIG_HOME=${XDG_CONFIG_HOME}
|
||||||
ARG XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR}
|
ARG XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR}
|
||||||
|
|
||||||
|
## Add the user with default password
|
||||||
|
RUN groupadd -g "${USER_GROUP_ID}" "${USER_GROUP}" && \
|
||||||
|
useradd -m -u "${USER_ID}" -g "${USER_GROUP_ID}" -s /bin/bash "${USER}" && \
|
||||||
|
echo "${USER}:${USER_PASSWORD}" | chpasswd
|
||||||
|
|
||||||
## Set the desired Locale
|
## Set the desired Locale
|
||||||
RUN locale-gen ${LOCALE_LANG} && \
|
RUN locale-gen ${LOCALE_LANG} && \
|
||||||
dpkg-reconfigure --frontend=noninteractive locales && \
|
dpkg-reconfigure --frontend=noninteractive locales && \
|
||||||
@@ -148,11 +153,6 @@ RUN mkdir /var/run/sshd && \
|
|||||||
### Set timzone
|
### Set timzone
|
||||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||||
|
|
||||||
## Add the user with default password
|
|
||||||
RUN groupadd -g "${USER_GROUP_ID}" "${USER_GROUP}" && \
|
|
||||||
useradd -m -u "${USER_ID}" -g "${USER_GROUP_ID}" -s /bin/bash "${USER}" && \
|
|
||||||
echo "${USER}:${USER_PASSWORD}" | chpasswd
|
|
||||||
|
|
||||||
## Lighttpd setup and create the runit service for lighttpd
|
## Lighttpd setup and create the runit service for lighttpd
|
||||||
ENV LIGHTTPD_RUN="/etc/service/lighttpd/run"
|
ENV LIGHTTPD_RUN="/etc/service/lighttpd/run"
|
||||||
ENV LIGHTTPD_CONFIG_PATH="/config/lighttpd"
|
ENV LIGHTTPD_CONFIG_PATH="/config/lighttpd"
|
||||||
|
Reference in New Issue
Block a user