From f24c511a0cee617c1cac3c9d1b7eaea31ea892c3 Mon Sep 17 00:00:00 2001 From: Craig Date: Sat, 18 Apr 2020 20:56:13 +0000 Subject: [PATCH] change to docker setup --- .devcontainer/Dockerfile | 158 +----------------- .docker/build | 25 ++- .docker/files/base/Dockerfile | 13 ++ .docker/files/chromium/Dockerfile | 6 +- Dockerfile => .docker/files/deps/Dockerfile | 12 -- .docker/files/dev/Dockerfile | 170 ++++++++++++++++++++ .docker/files/firefox/Dockerfile | 8 +- docker-compose.yaml | 15 -- 8 files changed, 210 insertions(+), 197 deletions(-) create mode 100644 .docker/files/base/Dockerfile rename Dockerfile => .docker/files/deps/Dockerfile (89%) create mode 100644 .docker/files/dev/Dockerfile delete mode 100644 docker-compose.yaml diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 57dd59dd..3bc2529b 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,160 +1,4 @@ -FROM debian:stretch-slim - -# -# cluster fuck of packages for neko, node, go and gstreamer -RUN set -eux; apt-get update; apt-get install -y --no-install-recommends \ - autoconf ca-certificates curl netbase wget \ - bzr git mercurial openssh-client subversion procps cmake automake bzip2 dpkg-dev file g++ gcc \ - libbz2-dev libc6-dev libcurl4-openssl-dev libdb-dev libevent-dev libffi-dev libgdbm-dev libglib2.0-dev libgmp-dev \ - libjpeg-dev libkrb5-dev liblzma-dev libmagickcore-dev libmagickwand-dev libmaxminddb-dev libncurses5-dev libncursesw5-dev \ - libpng-dev libpq-dev libreadline-dev libsqlite3-dev libssl-dev libtool libwebp-dev libxml2-dev libxslt-dev libyaml-dev \ - make patch unzip xz-utils zlib1g-dev pkg-config \ - build-essential perl python autopoint bison flex \ - gettext openssl libopus-dev libvpx-dev libpulse-dev libx11-dev libxv-dev libxt-dev libxrandr-dev \ - libxfixes-dev apt-utils x11vnc libxtst-dev dialog \ - pulseaudio openbox chromium firefox-esr dbus-x11 xserver-xorg-video-dummy supervisor; \ - if ! command -v gpg > /dev/null; then \ - apt-get install -y --no-install-recommends gnupg dirmngr; \ - fi - -# -# Install libclipboard -RUN set -eux; \ - cd /tmp ; \ - git clone https://github.com/jtanx/libclipboard ; \ - cd libclipboard ; \ - cmake . ; \ - make -j4; \ - make install; \ - rm -rf /tmp/libclipboard - -# -# Set up env for gst -ENV PATH=/gst/local/bin:$PATH -ENV LD_LIBRARY_PATH=/gst/local/lib:$LD_LIBRARY_PATH -ENV PKG_CONFIG_PATH=/gst/local/lib/pkgconfig:$PKG_CONFIG_PATH - -# -# Add node -ENV NODE_VERSION 12.14.1 -RUN set -eux; \ - ARCH= ; dpkgArch="$(dpkg --print-architecture)" \ - ;case "${dpkgArch##*-}" in \ - amd64) ARCH='x64';; \ - ppc64el) ARCH='ppc64le';; \ - s390x) ARCH='s390x';; \ - arm64) ARCH='arm64';; \ - armhf) ARCH='armv7l';; \ - i386) ARCH='x86';; \ - *) echo "unsupported architecture"; exit 1 ;; \ - esac;\ - # gpg keys listed at https://github.com/nodejs/node#release-keys - for key in \ - 94AE36675C464D64BAFA68DD7434390BDBE9B9C5 \ - FD3A5288F042B6850C66B31F09FE44734EB7990E \ - 71DCFD284A79C3B38668286BC97EC7A07EDE3FC1 \ - DD8F2338BAE7501E3DD5AC78C273792F7D83545D \ - C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8 \ - B9AE9905FFD7803F25714661B63B535A4C206CA9 \ - 77984A986EBC2AA786BC0F66B01FBB92821C587A \ - 8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600 \ - 4ED778F539E3634C779C87C6D7062848A1AB005C \ - A48C2BEE680E841632CD4E44F07496B3EB3C1762 \ - B9E2F5981AA6E0CD28160D9FF13993A75599653C \ - ; do \ - gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" || \ - gpg --batch --keyserver hkp://ipv4.pool.sks-keyservers.net --recv-keys "$key" || \ - gpg --batch --keyserver hkp://pgp.mit.edu:80 --recv-keys "$key"; \ - done; \ - curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz"; \ - curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc"; \ - gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc; \ - grep " node-v$NODE_VERSION-linux-$ARCH.tar.xz\$" SHASUMS256.txt | sha256sum -c - ; \ - tar -xJf "node-v$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local --strip-components=1 --no-same-owner; \ - rm "node-v$NODE_VERSION-linux-$ARCH.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt; \ - ln -s /usr/local/bin/node /usr/local/bin/nodejs - -# -# Add golang -ENV GOLANG_VERSION 1.14.1 -RUN set -eux; \ - dpkgArch="$(dpkg --print-architecture)"; \ - case "${dpkgArch##*-}" in \ - amd64) goRelArch='linux-amd64'; goRelSha256='2f49eb17ce8b48c680cdb166ffd7389702c0dec6effa090c324804a5cac8a7f8' ;; \ - armhf) goRelArch='linux-armv6l'; goRelSha256='04f10e345dae0d7c6c32ffd6356b47f2d4d0e8a0cb757f4ef48ead6c5bef206f' ;; \ - arm64) goRelArch='linux-arm64'; goRelSha256='5d8f2c202f35481617e24e63cca30c6afb1ec2585006c4a6ecf16c5f4928ab3c' ;; \ - i386) goRelArch='linux-386'; goRelSha256='92d465accdebbe2d0749b2f90c22ecb1fd2492435144923f88ce410cd56b6546' ;; \ - ppc64el) goRelArch='linux-ppc64le'; goRelSha256='6559201d452ee2782dfd684d59c05e3ecf789dc40a7ec0ad9ae2dd9f489c0fe1' ;; \ - s390x) goRelArch='linux-s390x'; goRelSha256='af009bd6e7729c441fec78af427743fefbf11f919c562e01b37836d835f74226' ;; \ - *) goRelArch='src'; goRelSha256='2ad2572115b0d1b4cb4c138e6b3a31cee6294cb48af75ee86bec3dca04507676'; \ - echo >&2; echo >&2 "warning: current architecture ($dpkgArch) does not have a corresponding Go binary release; will be building from source"; echo >&2 ;; \ - esac; \ - url="https://golang.org/dl/go${GOLANG_VERSION}.${goRelArch}.tar.gz"; \ - wget -O go.tgz "$url"; \ - echo "${goRelSha256} *go.tgz" | sha256sum -c -; \ - tar -C /usr/local -xzf go.tgz; \ - rm go.tgz; \ - if [ "$goRelArch" = 'src' ]; then \ - echo >&2; \ - echo >&2 'error: UNIMPLEMENTED'; \ - echo >&2 'TODO install golang-any from jessie-backports for GOROOT_BOOTSTRAP (and uninstall after build)'; \ - echo >&2; \ - exit 1; \ - fi; \ - export PATH="/usr/local/go/bin:$PATH"; \ - go version - -ENV GOPATH /go -ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH - -# -# Install Go tools w/module support -RUN mkdir -p /tmp/gotools \ - && cd /tmp/gotools \ - && GOPATH=/tmp/gotools GO111MODULE=on go get -v golang.org/x/tools/gopls@latest 2>&1 \ - && GOPATH=/tmp/gotools GO111MODULE=on go get -v \ - honnef.co/go/tools/...@latest \ - golang.org/x/tools/cmd/gorename@latest \ - golang.org/x/tools/cmd/goimports@latest \ - golang.org/x/tools/cmd/guru@latest \ - golang.org/x/lint/golint@latest \ - github.com/mdempsky/gocode@latest \ - github.com/cweill/gotests/...@latest \ - github.com/haya14busa/goplay/cmd/goplay@latest \ - github.com/sqs/goreturns@latest \ - github.com/josharian/impl@latest \ - github.com/davidrjenni/reftools/cmd/fillstruct@latest \ - github.com/uudashr/gopkgs/v2/cmd/gopkgs@latest \ - github.com/ramya-rao-a/go-outline@latest \ - github.com/acroca/go-symbols@latest \ - github.com/godoctor/godoctor@latest \ - github.com/rogpeppe/godef@latest \ - github.com/zmb3/gogetdoc@latest \ - github.com/fatih/gomodifytags@latest \ - github.com/mgechev/revive@latest \ - github.com/go-delve/delve/cmd/dlv@latest 2>&1 \ - # - # Build Go tools w/o module support - && GOPATH=/tmp/gotools go get -v github.com/alecthomas/gometalinter 2>&1 \ - # - # Build gocode-gomod - && GOPATH=/tmp/gotools go get -x -d github.com/stamblerre/gocode 2>&1 \ - && GOPATH=/tmp/gotools go build -o gocode-gomod github.com/stamblerre/gocode \ - # - # Install Go tools - && mv /tmp/gotools/bin/* /usr/local/bin/ \ - && mv gocode-gomod /usr/local/bin/ \ - # - # Install golangci-lint - && curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b /usr/local/bin 2>&1 \ - # - # Setup paths - && mkdir -p "$GOPATH/src" "$GOPATH/bin" "$GOPATH/pkg/mod" \ - && chmod -R 777 "$GOPATH" - -# -# Turn on go modules -ENV GO111MODULE=on +FROM nurdism/neko:dev # Use the "remoteUser" property in devcontainer.json to use it. On Linux, the container # user's GID/UIDs will be updated to match your local UID/GID (when using the dockerFile property). diff --git a/.docker/build b/.docker/build index 512d3298..c04506f0 100755 --- a/.docker/build +++ b/.docker/build @@ -7,7 +7,8 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )/.." build_gst() { - if [ ! -d /gst ]; then + if [ ! -L /gst || ! -d /gst ]; then + sudo rm -rf /gst; sudo mkdir -p /workspace/.build/gst sudo ln -s /workspace/.build/gst /gst sudo chown -R neko /workspace/.build @@ -39,23 +40,33 @@ build_gst() { done' } +build_dev() { + set -eux; \ + sudo docker build -f .docker/files/dev/Dockerfile -t nurdism/neko:dev $DIR ; \ + sudo docker push nurdism/neko:dev; +} + +build_deps() { + set -eux; \ + sudo docker build -f .docker/files/deps/Dockerfile -t nurdism/neko:deps $DIR ; \ + sudo docker push nurdism/neko:deps; +} + build_base() { set -eux; \ cd $DIR/server; go get; ./build; \ cd $DIR/client; npm install; npm run build; \ - cd $DIR; sudo docker build -f Dockerfile -t nurdism/neko:base . ; + sudo docker build -f .docker/files/base/Dockerfile -t nurdism/neko:base $DIR ; } build_firefox() { set -eux; \ - cd $DIR/.docker/files/firefox; \ - sudo docker build -f Dockerfile -t nurdism/neko:firefox -t nurdism/neko:latest . ; + sudo docker build -f .docker/files/firefox/Dockerfile -t nurdism/neko:firefox -t nurdism/neko:latest $DIR ; } build_chromium() { set -eux; \ - cd $DIR/.docker/files/chromium; \ - sudo docker build -f Dockerfile -t nurdism/neko:chromium . ; + sudo docker build -f .docker/files/chromium/Dockerfile -t nurdism/neko:chromium $DIR ; } build_docker() { @@ -82,6 +93,8 @@ set -ex case $1 in push) build_push ;; docker) build_docker ;; + deps) build_deps ;; + dev) build_dev ;; gst) build_gst ;; *) build_docker ;; esac diff --git a/.docker/files/base/Dockerfile b/.docker/files/base/Dockerfile new file mode 100644 index 00000000..d6611759 --- /dev/null +++ b/.docker/files/base/Dockerfile @@ -0,0 +1,13 @@ +FROM nurdism/neko:deps + +# +# neko files +COPY .docker/files/neko/supervisord.conf /etc/neko/supervisord/neko.conf +COPY client/dist/ /var/www +COPY server/bin/neko /usr/bin/neko + +# +# neko env +ENV NEKO_PASSWORD=neko +ENV NEKO_PASSWORD_ADMIN=admin +ENV NEKO_BIND=:8080 \ No newline at end of file diff --git a/.docker/files/chromium/Dockerfile b/.docker/files/chromium/Dockerfile index 47fefb19..f2cc3025 100644 --- a/.docker/files/chromium/Dockerfile +++ b/.docker/files/chromium/Dockerfile @@ -19,6 +19,6 @@ RUN set -eux; apt-get update; \ # # copy configuation files -COPY supervisord.conf /etc/neko/supervisord/chromium.conf -COPY preferences.json /usr/share/chromium/master_preferences -COPY policies.json /etc/chromium/policies/managed/policies.json \ No newline at end of file +COPY .docker/files/chromium/supervisord.conf /etc/neko/supervisord/chromium.conf +COPY .docker/files/chromium/preferences.json /usr/share/chromium/master_preferences +COPY .docker/files/chromium/policies.json /etc/chromium/policies/managed/policies.json \ No newline at end of file diff --git a/Dockerfile b/.docker/files/deps/Dockerfile similarity index 89% rename from Dockerfile rename to .docker/files/deps/Dockerfile index 6815e30a..5615f7cd 100644 --- a/Dockerfile +++ b/.docker/files/deps/Dockerfile @@ -55,22 +55,10 @@ ENV DISPLAY=:99.0 # copy configuation files COPY .docker/files/dbus /usr/bin/dbus COPY .docker/files/openbox.xml /etc/neko/openbox.xml -COPY .docker/files/neko/supervisord.conf /etc/neko/supervisord/neko.conf COPY .docker/files/supervisord.conf /etc/neko/supervisord.conf COPY .docker/files/xorg.conf /etc/neko/xorg.conf COPY .docker/files/default.pa /etc/pulse/default.pa -# -# neko files -COPY client/dist/ /var/www -COPY server/bin/neko /usr/bin/neko - -# -# neko env -ENV NEKO_PASSWORD=neko -ENV NEKO_PASSWORD_ADMIN=admin -ENV NEKO_BIND=:8080 - # # run neko CMD ["/usr/bin/supervisord", "-c", "/etc/neko/supervisord.conf"] \ No newline at end of file diff --git a/.docker/files/dev/Dockerfile b/.docker/files/dev/Dockerfile new file mode 100644 index 00000000..b9453f9d --- /dev/null +++ b/.docker/files/dev/Dockerfile @@ -0,0 +1,170 @@ +FROM debian:stretch-slim + +# +# cluster fuck of packages for neko, node, go and gstreamer +RUN set -eux; apt-get update; apt-get install -y --no-install-recommends \ + autoconf ca-certificates curl netbase wget gnupg dirmngr libatomic1 \ + bzr git mercurial openssh-client subversion procps cmake automake bzip2 dpkg-dev file g++ gcc \ + libbz2-dev libc6-dev libcurl4-openssl-dev libdb-dev libevent-dev libffi-dev libgdbm-dev libglib2.0-dev libgmp-dev \ + libjpeg-dev libkrb5-dev liblzma-dev libmagickcore-dev libmagickwand-dev libmaxminddb-dev libncurses5-dev libncursesw5-dev \ + libpng-dev libpq-dev libreadline-dev libsqlite3-dev libssl-dev libtool libwebp-dev libxml2-dev libxslt-dev libyaml-dev \ + make patch unzip xz-utils zlib1g-dev pkg-config \ + build-essential perl python autopoint bison flex \ + gettext openssl libopus-dev libvpx-dev libpulse-dev libx11-dev libxv-dev libxt-dev libxrandr-dev \ + libxfixes-dev apt-utils x11vnc libxtst-dev dialog \ + pulseaudio openbox chromium firefox-esr dbus-x11 xserver-xorg-video-dummy supervisor; + +# +# install libclipboard +RUN set -eux; \ + cd /tmp; \ + git clone https://github.com/jtanx/libclipboard; \ + cd libclipboard; \ + cmake . ; \ + make -j4; \ + make install; \ + rm -rf /tmp/libclipboard; + +# +# set up env for gst +ENV PATH=/gst/local/bin:$PATH +ENV LD_LIBRARY_PATH=/gst/local/lib:$LD_LIBRARY_PATH +ENV PKG_CONFIG_PATH=/gst/local/lib/pkgconfig:$PKG_CONFIG_PATH + +# +# copy gst +COPY .build/gst/local /gst/local/ + +# +# add node +ENV NODE_VERSION 12.16.2 + +RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \ + && case "${dpkgArch##*-}" in \ + amd64) ARCH='x64';; \ + ppc64el) ARCH='ppc64le';; \ + s390x) ARCH='s390x';; \ + arm64) ARCH='arm64';; \ + armhf) ARCH='armv7l';; \ + i386) ARCH='x86';; \ + *) echo "unsupported architecture"; exit 1 ;; \ + esac \ + && set -ex \ + && for key in \ + 94AE36675C464D64BAFA68DD7434390BDBE9B9C5 \ + FD3A5288F042B6850C66B31F09FE44734EB7990E \ + 71DCFD284A79C3B38668286BC97EC7A07EDE3FC1 \ + DD8F2338BAE7501E3DD5AC78C273792F7D83545D \ + C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8 \ + B9AE9905FFD7803F25714661B63B535A4C206CA9 \ + 77984A986EBC2AA786BC0F66B01FBB92821C587A \ + 8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600 \ + 4ED778F539E3634C779C87C6D7062848A1AB005C \ + A48C2BEE680E841632CD4E44F07496B3EB3C1762 \ + B9E2F5981AA6E0CD28160D9FF13993A75599653C \ + ; do \ + gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" || \ + gpg --batch --keyserver hkp://ipv4.pool.sks-keyservers.net --recv-keys "$key" || \ + gpg --batch --keyserver hkp://pgp.mit.edu:80 --recv-keys "$key" ; \ + done \ + && curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \ + && curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \ + && gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \ + && grep " node-v$NODE_VERSION-linux-$ARCH.tar.xz\$" SHASUMS256.txt | sha256sum -c - \ + && tar -xJf "node-v$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \ + && rm "node-v$NODE_VERSION-linux-$ARCH.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \ + && apt-mark auto '.*' > /dev/null \ + && find /usr/local -type f -executable -exec ldd '{}' ';' \ + | awk '/=>/ { print $(NF-1) }' \ + | sort -u \ + | xargs -r dpkg-query --search \ + | cut -d: -f1 \ + | sort -u \ + | xargs -r apt-mark manual \ + && ln -s /usr/local/bin/node /usr/local/bin/nodejs \ + # smoke tests + && node --version \ + && npm --version + +# +# add golang +ENV GOLANG_VERSION 1.14.2 +RUN set -eux; \ + dpkgArch="$(dpkg --print-architecture)"; \ + case "${dpkgArch##*-}" in \ + amd64) goRelArch='linux-amd64'; goRelSha256='6272d6e940ecb71ea5636ddb5fab3933e087c1356173c61f4a803895e947ebb3' ;; \ + armhf) goRelArch='linux-armv6l'; goRelSha256='eb4550ba741506c2a4057ea4d3a5ad7ed5a887de67c7232f1e4795464361c83c' ;; \ + arm64) goRelArch='linux-arm64'; goRelSha256='bb6d22fe5806352c3d0826676654e09b6e41eb1af52e8d506d3fa85adf7f8d88' ;; \ + i386) goRelArch='linux-386'; goRelSha256='cab5f51e6ffb616c6ee963c3d0650ca4e3c4108307c44f2baf233fcb8ff098f6' ;; \ + ppc64el) goRelArch='linux-ppc64le'; goRelSha256='48c22268c81ced9084a43bbe2c1596d3e636b5560b30a32434a7f15e561de160' ;; \ + s390x) goRelArch='linux-s390x'; goRelSha256='501cc919648c9d85b901963303c5061ea6814c80f0d35fda9e62980d3ff58cf4' ;; \ + *) goRelArch='src'; goRelSha256='98de84e69726a66da7b4e58eac41b99cbe274d7e8906eeb8a5b7eb0aadee7f7c'; \ + echo >&2; echo >&2 "warning: current architecture ($dpkgArch) does not have a corresponding Go binary release; will be building from source"; echo >&2 ;; \ + esac; \ + url="https://golang.org/dl/go${GOLANG_VERSION}.${goRelArch}.tar.gz"; \ + wget -O go.tgz "$url"; \ + echo "${goRelSha256} *go.tgz" | sha256sum -c -; \ + tar -C /usr/local -xzf go.tgz; \ + rm go.tgz; \ + if [ "$goRelArch" = 'src' ]; then \ + echo >&2; \ + echo >&2 'error: UNIMPLEMENTED'; \ + echo >&2 'TODO install golang-any from jessie-backports for GOROOT_BOOTSTRAP (and uninstall after build)'; \ + echo >&2; \ + exit 1; \ + fi; \ + export PATH="/usr/local/go/bin:$PATH"; \ + go version + +ENV GOPATH /go +ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH +RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH" + +# +# install Go tools w/module support +RUN mkdir -p /tmp/gotools \ + && cd /tmp/gotools \ + && GOPATH=/tmp/gotools GO111MODULE=on go get -v golang.org/x/tools/gopls@latest 2>&1 \ + && GOPATH=/tmp/gotools GO111MODULE=on go get -v \ + honnef.co/go/tools/...@latest \ + golang.org/x/tools/cmd/gorename@latest \ + golang.org/x/tools/cmd/goimports@latest \ + golang.org/x/tools/cmd/guru@latest \ + golang.org/x/lint/golint@latest \ + github.com/mdempsky/gocode@latest \ + github.com/cweill/gotests/...@latest \ + github.com/haya14busa/goplay/cmd/goplay@latest \ + github.com/sqs/goreturns@latest \ + github.com/josharian/impl@latest \ + github.com/davidrjenni/reftools/cmd/fillstruct@latest \ + github.com/uudashr/gopkgs/v2/cmd/gopkgs@latest \ + github.com/ramya-rao-a/go-outline@latest \ + github.com/acroca/go-symbols@latest \ + github.com/godoctor/godoctor@latest \ + github.com/rogpeppe/godef@latest \ + github.com/zmb3/gogetdoc@latest \ + github.com/fatih/gomodifytags@latest \ + github.com/mgechev/revive@latest \ + github.com/go-delve/delve/cmd/dlv@latest 2>&1 \ + # + # build Go tools w/o module support + && GOPATH=/tmp/gotools go get -v github.com/alecthomas/gometalinter 2>&1 \ + # + # build gocode-gomod + && GOPATH=/tmp/gotools go get -x -d github.com/stamblerre/gocode 2>&1 \ + && GOPATH=/tmp/gotools go build -o gocode-gomod github.com/stamblerre/gocode \ + # + # install Go tools + && mv /tmp/gotools/bin/* /usr/local/bin/ \ + && mv gocode-gomod /usr/local/bin/ \ + # + # install golangci-lint + && curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b /usr/local/bin 2>&1 \ + # + # setup paths + && mkdir -p "$GOPATH/src" "$GOPATH/bin" "$GOPATH/pkg/mod" \ + && chmod -R 777 "$GOPATH" + +# +# turn on go modules +ENV GO111MODULE=on \ No newline at end of file diff --git a/.docker/files/firefox/Dockerfile b/.docker/files/firefox/Dockerfile index 7c7e3612..0ef34a59 100644 --- a/.docker/files/firefox/Dockerfile +++ b/.docker/files/firefox/Dockerfile @@ -16,7 +16,7 @@ RUN set -eux; apt-get update; \ # # copy configuation files -COPY supervisord.conf /etc/neko/supervisord/firefox.conf -COPY neko.js /usr/lib/firefox-esr/mozilla.cfg -COPY autoconfig.js /usr/lib/firefox-esr/defaults/pref/autoconfig.js -COPY policies.json /usr/lib/firefox-esr/distribution/policies.json +COPY .docker/files/firefox/supervisord.conf /etc/neko/supervisord/firefox.conf +COPY .docker/files/firefox/neko.js /usr/lib/firefox-esr/mozilla.cfg +COPY .docker/files/firefox/autoconfig.js /usr/lib/firefox-esr/defaults/pref/autoconfig.js +COPY .docker/files/firefox/policies.json /usr/lib/firefox-esr/distribution/policies.json diff --git a/docker-compose.yaml b/docker-compose.yaml deleted file mode 100644 index fe86e32f..00000000 --- a/docker-compose.yaml +++ /dev/null @@ -1,15 +0,0 @@ -version: "2.0" -services: - neko: - image: nurdism/neko:firefox - restart: always - shm_size: "1gb" - ports: - - "80:8080" - - "59000-59100:59000-59100/udp" - environment: - DISPLAY: :99.0 - NEKO_PASSWORD: neko - NEKO_PASSWORD_ADMIN: admin - NEKO_BIND: :8080 - NEKO_EPR: 59000-59100 \ No newline at end of file