mirror of
https://github.com/bensuperpc/dockcross.git
synced 2024-11-09 20:57:26 +01:00
browser-asmjs: cp ~/.emscripten, etc to the user home in the entrypoint
This commit is contained in:
parent
b84b303f13
commit
30e29f3bbb
2
Makefile
2
Makefile
@ -8,7 +8,9 @@ darwin-x64:
|
||||
$(DOCKER) build -t $(IMAGE)-darwin-x64 darwin-x64
|
||||
|
||||
browser-asmjs: base browser-asmjs/Dockerfile
|
||||
cp -r test browser-asmjs/
|
||||
$(DOCKER) build -t $(IMAGE)-browser-asmjs browser-asmjs
|
||||
rm -rf browser-asmjs/test
|
||||
|
||||
linux-x86:
|
||||
$(DOCKER) build -t $(IMAGE)-linux-x86 linux-x86
|
||||
|
@ -28,13 +28,17 @@ ENV CC=/usr/emsdk_portable/emscripten/tag-${EMSCRIPTEN_VERSION}/emcc \
|
||||
AR=/usr/emsdk_portable/emscripten/tag-${EMSCRIPTEN_VERSION}/emar
|
||||
|
||||
# Emscripten generates system libraries the firsts time it runs
|
||||
ADD test/ /tmp/test/
|
||||
RUN cd /tmp && \
|
||||
/bin/echo -e "#include <iostream>\nint main() { std::cout << \"first run\"; return 0; }" > /tmp/first_run.cxx && \
|
||||
$CXX /tmp/first_run.cxx && \
|
||||
$CXX /tmp/first_run.cxx -o a.out.js && \
|
||||
rm /tmp/first_run.* && \
|
||||
/bin/echo -e "#include <stdio.h>\nint main() { printf(\"first run\"); return 0; }" > /tmp/first_run.c && \
|
||||
$CC /tmp/first_run.c && \
|
||||
rm /tmp/first_run.* a.out.js
|
||||
$CC /tmp/first_run.c -o a.out.js && \
|
||||
rm /tmp/first_run.* a.out.js && \
|
||||
cd /tmp/test && \
|
||||
python /tmp/test/run.py; python /tmp/test/run.py && \
|
||||
cd && rm -rf /tmp/test
|
||||
|
||||
ENV DEFAULT_DOCKCROSS_IMAGE thewtex/cross-compiler-browser-asmjs
|
||||
|
||||
|
@ -26,8 +26,9 @@ if [[ -n $BUILDER_UID ]] && [[ -n $BUILDER_GID ]]; then
|
||||
groupadd -o -g $BUILDER_GID $BUILDER_GROUP 2> /dev/null
|
||||
useradd -o -m -g $BUILDER_GID -u $BUILDER_UID $BUILDER_USER 2> /dev/null
|
||||
export HOME=/home/${BUILDER_USER}
|
||||
cp /root/.bashrc $HOME
|
||||
chown $BUILDER_UID:$BUILDER_GID $HOME/.bashrc
|
||||
shopt -s dotglob
|
||||
cp -r /root/* $HOME/
|
||||
chown -R $BUILDER_UID:$BUILDER_GID $HOME/*
|
||||
|
||||
# Run the command as the specified user/group.
|
||||
exec chpst -u :$BUILDER_UID:$BUILDER_GID "$@"
|
||||
|
Loading…
Reference in New Issue
Block a user