Docker: use a entrypoint script (#1227)
In favor of `/etc/bash.bashrc`, which is only read for interactive shells.
This commit is contained in:
committed by
GitHub
parent
3bde060365
commit
e28e47659c
@@ -58,11 +58,12 @@ FROM ubuntu:jammy AS stage_deploy
|
||||
|
||||
COPY --from=stage_build /emsdk /emsdk
|
||||
|
||||
# Fallback in case Emscripten isn't activated.
|
||||
# This will let use tools offered by this image inside other Docker images
|
||||
# (sub-stages) or with custom / no entrypoint
|
||||
# These fallback environment variables are intended for situations where the
|
||||
# entrypoint is not utilized (as in a derived image) or overridden (e.g. when
|
||||
# using `--entrypoint /bin/bash` in CLI).
|
||||
# This corresponds to the env variables set during: `source ./emsdk_env.sh`
|
||||
ENV EMSDK=/emsdk \
|
||||
PATH="/emsdk:/emsdk/upstream/emscripten:/emsdk/upstream/bin:/emsdk/node/16.20.0_64bit/bin:${PATH}"
|
||||
PATH="/emsdk:/emsdk/upstream/emscripten:/emsdk/node/16.20.0_64bit/bin:${PATH}"
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Create a 'standard` 1000:1000 user
|
||||
@@ -75,8 +76,6 @@ ENV EMSDK=/emsdk \
|
||||
RUN echo "## Create emscripten user (1000:1000)" \
|
||||
&& groupadd --gid 1000 emscripten \
|
||||
&& useradd --uid 1000 --gid emscripten --shell /bin/bash --create-home emscripten \
|
||||
&& echo "umask 0000" >> /etc/bash.bashrc \
|
||||
&& echo ". /emsdk/emsdk_env.sh" >> /etc/bash.bashrc \
|
||||
&& echo "## Done"
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
@@ -120,6 +119,8 @@ RUN echo "## Update and install packages" \
|
||||
# Use commonly used /src as working directory
|
||||
WORKDIR /src
|
||||
|
||||
ENTRYPOINT ["/emsdk/docker/entrypoint.sh"]
|
||||
|
||||
LABEL maintainer="kontakt@trzeci.eu" \
|
||||
org.label-schema.name="emscripten" \
|
||||
org.label-schema.description="The official container with Emscripten SDK" \
|
||||
|
||||
Reference in New Issue
Block a user