cutego/internal/docker/js/Dockerfile.wasm
2019-04-21 02:42:59 +02:00

28 lines
1.1 KiB
Docker

FROM ubuntu:16.04
LABEL maintainer therecipe
ENV USER user
ENV HOME /home/$USER
ENV GOPATH $HOME/work
ENV PATH /usr/local/go/bin:$PATH
ENV QT_API 5.12.0
ENV QT_DOCKER true
ENV QT_QMAKE_DIR /usr/local/Qt-5.13.0/bin
COPY --from=therecipe/qt:linux /usr/local/go /usr/local/go
COPY --from=therecipe/qt:linux $GOPATH/bin $GOPATH/bin
COPY --from=therecipe/qt:linux $GOPATH/src/github.com/therecipe/qt $GOPATH/src/github.com/therecipe/qt
COPY --from=therecipe/qt:js_base $HOME/emsdk $HOME/emsdk
COPY --from=therecipe/qt:js_base $HOME/.emscripten $HOME/.emscripten
COPY --from=therecipe/qt:js_base /usr/local/Qt-5.13.0 /usr/local/Qt-5.13.0
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install python2.7 nodejs cmake default-jre && apt-get -qq clean
RUN ln -s /usr/bin/python2.7 /usr/bin/python
RUN $GOPATH/bin/qtsetup prep
RUN $GOPATH/bin/qtsetup check wasm
RUN QT_STUB=true $GOPATH/bin/qtsetup generate
RUN $GOPATH/bin/qtsetup generate wasm
RUN $GOPATH/bin/qtsetup install wasm
RUN cd $GOPATH/src/github.com/therecipe/qt/internal/examples/widgets/line_edits && $GOPATH/bin/qtdeploy build wasm && rm -rf ./deploy