-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated emsdk Dockerfile to 1.38.20, added yarn
- Loading branch information
Showing
6 changed files
with
80 additions
and
92 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,90 +1,83 @@ | ||
# Liberally copied from trzeci/emscripten | ||
|
||
ARG EMSCRIPTEN_SDK=sdk-tag-1.38.11-64bit | ||
FROM trzeci/emscripten-slim:${EMSCRIPTEN_SDK} | ||
|
||
# ------------------------------------------------------------------------------ | ||
|
||
ARG VCS_REF | ||
ARG BUILD_DATE | ||
ARG EMSCRIPTEN_SDK | ||
|
||
# ------------------------------------------------------------------------------ | ||
|
||
RUN echo "\n## Start building" \ | ||
\ | ||
&& echo "\n## Update and install packages" \ | ||
&& apt-get -qq -y update && apt-get -qq install -y --no-install-recommends \ | ||
wget \ | ||
curl \ | ||
zip \ | ||
unzip \ | ||
git \ | ||
ssh-client \ | ||
ca-certificates \ | ||
build-essential \ | ||
libboost-all-dev \ | ||
make \ | ||
ant \ | ||
libidn11 \ | ||
\ | ||
&& echo "\n## Installing JRE 8" \ | ||
&& echo "deb http://http.debian.net/debian jessie-backports main" >> /etc/apt/sources.list \ | ||
&& apt-get -qq -y update && apt-get -qq install -y --no-install-recommends -t jessie-backports openjdk-8-jre-headless \ | ||
\ | ||
&& echo "\n## Installing CMake" \ | ||
&& wget https://cmake.org/files/v3.7/cmake-3.7.2-Linux-x86_64.sh -q \ | ||
&& mkdir /opt/cmake \ | ||
&& printf "y\nn\n" | sh cmake-3.7.2-Linux-x86_64.sh --prefix=/opt/cmake > /dev/null \ | ||
&& rm -fr cmake*.sh /opt/cmake/doc \ | ||
&& rm -fr /opt/cmake/bin/cmake-gui \ | ||
&& rm -fr /opt/cmake/bin/ccmake \ | ||
&& rm -fr /opt/cmake/bin/cpack \ | ||
&& ln -s /opt/cmake/bin/cmake /usr/local/bin/cmake \ | ||
&& ln -s /opt/cmake/bin/ctest /usr/local/bin/ctest \ | ||
\ | ||
&& printf "JAVA='$(which java)'\n" >> $EM_CONFIG \ | ||
\ | ||
&& sleep 2 \ | ||
&& touch ${EM_CONFIG}_sanity \ | ||
\ | ||
&& emcc --version \ | ||
\ | ||
&& emcc --clear-cache --clear-ports \ | ||
\ | ||
&& echo "\n## Compile sample code" \ | ||
&& mkdir -p /tmp/emscripten_test && cd /tmp/emscripten_test \ | ||
&& printf '#include <iostream>\nint main(){std::cout<<"HELLO FROM DOCKER C++"<<std::endl;return 0;}' > test.cpp \ | ||
&& em++ -O2 test.cpp -o test.js && nodejs test.js \ | ||
&& em++ test.cpp -o test.js && nodejs test.js \ | ||
&& em++ test.cpp -o test.js --closure 1 && nodejs test.js \ | ||
\ | ||
&& cd / \ | ||
&& rm -fr /tmp/emscripten_test \ | ||
\ | ||
&& echo "\n## Moving Boost locally" \ | ||
\ | ||
&& mkdir /boost_includes \ | ||
&& cp -r /usr/include/boost /boost_includes/ \ | ||
\ | ||
&& echo "\n## Cleaning up" \ | ||
&& apt-mark manual make openjdk-8-jre-headless wget gcc git \ | ||
&& apt-get -y remove openjdk-7-jre-headless \ | ||
&& apt-get -y clean \ | ||
&& apt-get -y autoclean \ | ||
&& apt-get -y autoremove \ | ||
\ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& rm -rf /var/cache/debconf/*-old \ | ||
&& rm -rf /usr/share/doc/* \ | ||
&& rm -rf /usr/share/man/?? \ | ||
&& rm -rf /usr/share/man/??_* \ | ||
&& cp -R /usr/share/locale/en\@* /tmp/ && rm -rf /usr/share/locale/* && mv /tmp/en\@* /usr/share/locale/ \ | ||
\ | ||
&& echo "\n## Installed packages:" \ | ||
&& apt-mark showmanual | xargs -I % sh -c 'echo " * \`%\` : **"$(xargs dpkg -s % | grep Version | sed "s/Version: //")"**"' \ | ||
\ | ||
&& chmod -R 777 ${EM_DATA} \ | ||
&& echo "\n## Done" | ||
FROM trzeci/emscripten-slim:sdk-tag-1.38.20-64bit | ||
|
||
RUN apt-get -qq -y update | ||
RUN apt-get -qq install -y --no-install-recommends \ | ||
wget \ | ||
curl \ | ||
zip \ | ||
unzip \ | ||
git \ | ||
ssh-client \ | ||
ca-certificates \ | ||
build-essential \ | ||
libboost-all-dev \ | ||
make \ | ||
ant \ | ||
libidn11 | ||
|
||
|
||
RUN echo "deb http://http.debian.net/debian jessie-backports main" >> /etc/apt/sources.list | ||
RUN apt-get -qq -y update && apt-get -qq install -y --no-install-recommends -t jessie-backports openjdk-8-jre-headless | ||
|
||
RUN wget https://cmake.org/files/v3.7/cmake-3.7.2-Linux-x86_64.sh -q | ||
RUN mkdir /opt/cmake | ||
RUN printf "y\nn\n" | sh cmake-3.7.2-Linux-x86_64.sh --prefix=/opt/cmake > /dev/null | ||
RUN rm -fr cmake*.sh /opt/cmake/doc | ||
RUN rm -fr /opt/cmake/bin/cmake-gui | ||
RUN rm -fr /opt/cmake/bin/ccmake | ||
RUN rm -fr /opt/cmake/bin/cpack | ||
RUN ln -s /opt/cmake/bin/cmake /usr/local/bin/cmake | ||
RUN ln -s /opt/cmake/bin/ctest /usr/local/bin/ctest | ||
|
||
RUN printf "JAVA='$(which java)'\n" >> $EM_CONFIG | ||
|
||
RUN sleep 2 | ||
RUN touch ${EM_CONFIG}_sanity | ||
|
||
RUN emcc --version | ||
|
||
RUN emcc --clear-cache --clear-ports | ||
|
||
RUN mkdir -p /tmp/emscripten_test | ||
RUN cd /tmp/emscripten_test | ||
RUN printf '#include <iostream>\nint main(){std::cout<<"HELLO FROM DOCKER C++"<<std::endl;return 0;}' > test.cpp | ||
|
||
RUN em++ -O2 test.cpp -o test.js | ||
RUN node test.js | ||
|
||
RUN em++ test.cpp -o test.js | ||
RUN node test.js | ||
|
||
RUN em++ test.cpp -o test.js --closure 1 | ||
RUN node test.js | ||
|
||
RUN cd / | ||
RUN rm -fr /tmp/emscripten_test | ||
|
||
RUN mkdir /boost_includes | ||
RUN cp -r /usr/include/boost /boost_includes/ | ||
|
||
RUN apt-mark manual make openjdk-8-jre-headless wget gcc git | ||
RUN apt-get -y remove openjdk-7-jre-headless | ||
RUN apt-get -y clean | ||
RUN apt-get -y autoclean | ||
RUN apt-get -y autoremove | ||
|
||
RUN rm -rf /var/lib/apt/lists/* | ||
RUN rm -rf /var/cache/debconf/*-old | ||
RUN rm -rf /usr/share/doc/* | ||
RUN rm -rf /usr/share/man/?? | ||
RUN rm -rf /usr/share/man/??_* | ||
RUN cp -R /usr/share/locale/en\@* /tmp/ | ||
RUN rm -rf /usr/share/locale/* | ||
RUN mv /tmp/en\@* /usr/share/locale/ | ||
|
||
RUN chmod -R 777 ${EM_DATA} | ||
|
||
ENV PATH="/emsdk_portable/node/bin:${PATH}" | ||
RUN npm install --global yarn | ||
RUN yarn --version | ||
|
||
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64/jre |
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
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
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
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
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