Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add emscripten docker container #114

Merged
merged 8 commits into from
Jun 3, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added emscripten+puppeteer docker images
  • Loading branch information
texodus committed Jun 3, 2018
commit 385c9e618c2935721b98b3472aa1ea9d7f5f018a
80 changes: 80 additions & 0 deletions docker/emsdk/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Liberally copied from trzeci/emscripten

ARG EMSCRIPTEN_SDK=sdk-tag-1.38.4-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## 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"

ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64/jre
24 changes: 24 additions & 0 deletions docker/puppeteer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Liberally copied from zenato/puppeteer

FROM node:8

RUN apt-get update && apt-get install -y wget --no-install-recommends \
&& wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
&& sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \
&& apt-get update \
&& apt-get install -y google-chrome-stable \
--no-install-recommends \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get purge --auto-remove -y curl \
&& rm -rf /src/*.deb

RUN yarn add puppeteer

RUN groupadd -r pptruser && useradd -r -g pptruser -G audio,video pptruser \
&& mkdir -p /home/pptruser/Downloads \
&& chown -R pptruser:pptruser /home/pptruser \
&& chown -R pptruser:pptruser /node_modules

USER pptruser

CMD ["google-chrome-stable"]