back to debian, better firefox support
This commit is contained in:
parent
e4a554830d
commit
56464778f2
@ -1,48 +1,29 @@
|
|||||||
FROM nurdism/neko
|
FROM nurdism/neko
|
||||||
|
|
||||||
ARG USERNAME=neko
|
RUN apt-get update && apt-get install -y --no-install-recommends autoconf ca-certificates curl netbase wget \
|
||||||
ARG USER_UID=1000
|
bzr git mercurial openssh-client subversion procps automake bzip2 dpkg-dev file g++ gcc \
|
||||||
ARG USER_GID=$USER_UID
|
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 \
|
||||||
|
&& if ! command -v gpg > /dev/null; then \
|
||||||
|
apt-get update; \
|
||||||
|
apt-get install -y --no-install-recommends gnupg dirmngr; \
|
||||||
|
fi
|
||||||
|
|
||||||
# Set to false to skip installing zsh and Oh My ZSH!
|
ENV NODE_VERSION 12.14.1
|
||||||
ARG INSTALL_ZSH="true"
|
RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
|
||||||
|
&& case "${dpkgArch##*-}" in \
|
||||||
# Location and expected SHA for common setup script - SHA generated on release
|
amd64) ARCH='x64';; \
|
||||||
ARG COMMON_SCRIPT_SOURCE="https://raw.githubusercontent.com/microsoft/vscode-dev-containers/master/script-library/common-alpine.sh"
|
ppc64el) ARCH='ppc64le';; \
|
||||||
ARG COMMON_SCRIPT_SHA="dev-mode"
|
s390x) ARCH='s390x';; \
|
||||||
|
arm64) ARCH='arm64';; \
|
||||||
# Install git, bash, dependencies, and add a non-root user
|
armhf) ARCH='armv7l';; \
|
||||||
RUN apk update \
|
i386) ARCH='x86';; \
|
||||||
&& apk add --no-cache wget coreutils ca-certificates \
|
*) echo "unsupported architecture"; exit 1 ;; \
|
||||||
&& apk add --no-cache wget openssl docker libxtst-dev xclip x11vnc glib-dev gobject-introspection \
|
|
||||||
#
|
|
||||||
# Verify git, common tools / libs installed, add/modify non-root user, optionally install zsh
|
|
||||||
&& wget -q -O /tmp/common-setup.sh $COMMON_SCRIPT_SOURCE \
|
|
||||||
&& if [ "$COMMON_SCRIPT_SHA" != "dev-mode" ]; then echo "$COMMON_SCRIPT_SHA /tmp/common-setup.sh" | sha256sum -c - ; fi \
|
|
||||||
&& /bin/ash /tmp/common-setup.sh "$INSTALL_ZSH" "$USERNAME" "$USER_UID" "$USER_GID" \
|
|
||||||
&& rm /tmp/common-setup.sh
|
|
||||||
|
|
||||||
ENV NODE_VERSION 13.7.0
|
|
||||||
RUN apk add --no-cache curl libstdc++ \
|
|
||||||
&& ARCH= && alpineArch="$(apk --print-arch)" \
|
|
||||||
&& case "${alpineArch##*-}" in \
|
|
||||||
x86_64) \
|
|
||||||
ARCH='x64' \
|
|
||||||
CHECKSUM="4c153345a08d2eeb40dfbb62f1ef6ade7ec369630f9cf9f061bf9d52b10acafc" \
|
|
||||||
;; \
|
|
||||||
*) ;; \
|
|
||||||
esac \
|
esac \
|
||||||
&& if [ -n "${CHECKSUM}" ]; then \
|
|
||||||
set -eu; \
|
|
||||||
curl -fsSLO --compressed "https://unofficial-builds.nodejs.org/download/release/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH-musl.tar.xz"; \
|
|
||||||
echo "$CHECKSUM node-v$NODE_VERSION-linux-$ARCH-musl.tar.xz" | sha256sum -c - \
|
|
||||||
&& tar -xJf "node-v$NODE_VERSION-linux-$ARCH-musl.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \
|
|
||||||
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs; \
|
|
||||||
else \
|
|
||||||
echo "Building from source" \
|
|
||||||
# backup build
|
|
||||||
&& apk add --no-cache binutils-gold g++ gcc gnupg libgcc linux-headers make python \
|
|
||||||
# gpg keys listed at https://github.com/nodejs/node#release-keys
|
# gpg keys listed at https://github.com/nodejs/node#release-keys
|
||||||
|
&& set -eux \
|
||||||
&& for key in \
|
&& for key in \
|
||||||
94AE36675C464D64BAFA68DD7434390BDBE9B9C5 \
|
94AE36675C464D64BAFA68DD7434390BDBE9B9C5 \
|
||||||
FD3A5288F042B6850C66B31F09FE44734EB7990E \
|
FD3A5288F042B6850C66B31F09FE44734EB7990E \
|
||||||
@ -60,54 +41,39 @@ RUN apk add --no-cache curl libstdc++ \
|
|||||||
gpg --batch --keyserver hkp://ipv4.pool.sks-keyservers.net --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" ; \
|
gpg --batch --keyserver hkp://pgp.mit.edu:80 --recv-keys "$key" ; \
|
||||||
done \
|
done \
|
||||||
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION.tar.xz" \
|
&& 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" \
|
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
|
||||||
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
|
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
|
||||||
&& grep " node-v$NODE_VERSION.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
|
&& grep " node-v$NODE_VERSION-linux-$ARCH.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
|
||||||
&& tar -xf "node-v$NODE_VERSION.tar.xz" \
|
&& tar -xJf "node-v$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \
|
||||||
&& cd "node-v$NODE_VERSION" \
|
&& rm "node-v$NODE_VERSION-linux-$ARCH.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \
|
||||||
&& ./configure \
|
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
|
||||||
&& make -j$(getconf _NPROCESSORS_ONLN) V= \
|
|
||||||
&& make install \
|
|
||||||
&& cd .. \
|
|
||||||
&& rm -Rf "node-v$NODE_VERSION" \
|
|
||||||
&& rm "node-v$NODE_VERSION.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt; \
|
|
||||||
fi \
|
|
||||||
&& rm -f "node-v$NODE_VERSION-linux-$ARCH-musl.tar.xz"
|
|
||||||
|
|
||||||
ENV GOLANG_VERSION 1.13.6
|
ENV GOLANG_VERSION 1.13.6
|
||||||
RUN set -eux \
|
RUN set -eux \
|
||||||
&& apk add --no-cache bash gcc musl-dev openssl go \
|
&& dpkgArch="$(dpkg --print-architecture)" \
|
||||||
&& export \
|
&& case "${dpkgArch##*-}" in \
|
||||||
# set GOROOT_BOOTSTRAP such that we can actually build Go
|
amd64) goRelArch='linux-amd64'; goRelSha256='a1bc06deb070155c4f67c579f896a45eeda5a8fa54f35ba233304074c4abbbbd' ;; \
|
||||||
GOROOT_BOOTSTRAP="$(go env GOROOT)" \
|
armhf) goRelArch='linux-armv6l'; goRelSha256='37a1a83e363dcf146a67fa839d170fd1afb13009585fdd493d0a3370fbe6f785' ;; \
|
||||||
# ... and set "cross-building" related vars to the installed system's values so that we create a build targeting the proper arch
|
arm64) goRelArch='linux-arm64'; goRelSha256='0a18125c4ed80f9c3045cf92384670907c4796b43ed63c4307210fe93e5bbca5' ;; \
|
||||||
# (for example, if our build host is GOARCH=amd64, but our build env/image is GOARCH=386, our build needs GOARCH=386)
|
i386) goRelArch='linux-386'; goRelSha256='27feb013106da784f09e560720aa41ab395c67f7eed4c4a0fce04bc6e3d01c7d' ;; \
|
||||||
GOOS="$(go env GOOS)" \
|
ppc64el) goRelArch='linux-ppc64le'; goRelSha256='26a977a8af5dc50a562f0a57b58dded5fa3bacfe77722cf8a84ea54ca54728dd' ;; \
|
||||||
GOARCH="$(go env GOARCH)" \
|
s390x) goRelArch='linux-s390x'; goRelSha256='5cd9900a1fa0f0cac657930b648381cad9b8c5e2bbc77caf86a6fb5cedad0017' ;; \
|
||||||
GOHOSTOS="$(go env GOHOSTOS)" \
|
*) goRelArch='src'; goRelSha256='aae5be954bdc40bcf8006eb77e8d8a5dde412722bc8effcdaf9772620d06420c'; \
|
||||||
GOHOSTARCH="$(go env GOHOSTARCH)" \
|
echo >&2; echo >&2 "warning: current architecture ($dpkgArch) does not have a corresponding Go binary release; will be building from source"; echo >&2 ;; \
|
||||||
; \
|
esac \
|
||||||
# also explicitly set GO386 and GOARM if appropriate
|
&& url="https://golang.org/dl/go${GOLANG_VERSION}.${goRelArch}.tar.gz" \
|
||||||
# https://github.com/docker-library/golang/issues/184
|
&& wget -O go.tgz "$url" \
|
||||||
apkArch="$(apk --print-arch)"; \
|
&& echo "${goRelSha256} *go.tgz" | sha256sum -c - \
|
||||||
case "$apkArch" in \
|
&& tar -C /usr/local -xzf go.tgz \
|
||||||
armhf) export GOARM='6' ;; \
|
&& rm go.tgz \
|
||||||
armv7) export GOARM='7' ;; \
|
&& if [ "$goRelArch" = 'src' ]; then \
|
||||||
x86) export GO386='387' ;; \
|
echo >&2; \
|
||||||
esac; \
|
echo >&2 'error: UNIMPLEMENTED'; \
|
||||||
wget -O go.tgz "https://golang.org/dl/go$GOLANG_VERSION.src.tar.gz"; \
|
echo >&2 'TODO install golang-any from jessie-backports for GOROOT_BOOTSTRAP (and uninstall after build)'; \
|
||||||
echo 'aae5be954bdc40bcf8006eb77e8d8a5dde412722bc8effcdaf9772620d06420c *go.tgz' | sha256sum -c -; \
|
echo >&2; \
|
||||||
tar -C /usr/local -xzf go.tgz; \
|
exit 1; \
|
||||||
rm go.tgz; \
|
fi \
|
||||||
cd /usr/local/go/src; \
|
|
||||||
./make.bash; \
|
|
||||||
rm -rf \
|
|
||||||
# https://github.com/golang/go/blob/0b30cf534a03618162d3015c8705dd2231e34703/src/cmd/dist/buildtool.go#L121-L125
|
|
||||||
/usr/local/go/pkg/bootstrap \
|
|
||||||
# https://golang.org/cl/82095
|
|
||||||
# https://github.com/golang/build/blob/e3fe1605c30f6a3fd136b561569933312ede8782/cmd/release/releaselet.go#L56
|
|
||||||
/usr/local/go/pkg/obj \
|
|
||||||
&& export PATH="/usr/local/go/bin:$PATH" \
|
&& export PATH="/usr/local/go/bin:$PATH" \
|
||||||
&& go version
|
&& go version
|
||||||
|
|
||||||
@ -115,7 +81,7 @@ ENV GOPATH /go
|
|||||||
ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
|
ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
|
||||||
|
|
||||||
#
|
#
|
||||||
# Install Go tools w/module support
|
# install Go tools w/module support
|
||||||
RUN mkdir -p /tmp/gotools \
|
RUN mkdir -p /tmp/gotools \
|
||||||
&& cd /tmp/gotools \
|
&& cd /tmp/gotools \
|
||||||
&& GO111MODULE=on go get -v golang.org/x/tools/gopls@latest 2>&1 \
|
&& GO111MODULE=on go get -v golang.org/x/tools/gopls@latest 2>&1 \
|
||||||
@ -141,17 +107,62 @@ RUN mkdir -p /tmp/gotools \
|
|||||||
github.com/mgechev/revive@latest \
|
github.com/mgechev/revive@latest \
|
||||||
github.com/go-delve/delve/cmd/dlv@latest 2>&1 \
|
github.com/go-delve/delve/cmd/dlv@latest 2>&1 \
|
||||||
#
|
#
|
||||||
# Install Go tools w/o module support
|
# install Go tools w/o module support
|
||||||
&& go get -v github.com/alecthomas/gometalinter 2>&1 \
|
&& go get -v github.com/alecthomas/gometalinter 2>&1 \
|
||||||
#
|
#
|
||||||
# Install gocode-gomod
|
# install gocode-gomod
|
||||||
&& go get -x -d github.com/stamblerre/gocode 2>&1 \
|
&& go get -x -d github.com/stamblerre/gocode 2>&1 \
|
||||||
&& go build -o gocode-gomod github.com/stamblerre/gocode \
|
&& go build -o gocode-gomod github.com/stamblerre/gocode \
|
||||||
&& mv gocode-gomod $GOPATH/bin/ \
|
&& mv gocode-gomod $GOPATH/bin/ \
|
||||||
#
|
#
|
||||||
# Install golangci-lint
|
# install golangci-lint
|
||||||
&& curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin 2>&1
|
&& curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin 2>&1
|
||||||
|
|
||||||
RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" "$GOPATH/pkg/mod" && chmod -R 777 "$GOPATH"
|
RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" "$GOPATH/pkg/mod" && chmod -R 777 "$GOPATH"
|
||||||
|
|
||||||
|
# turn on go modules
|
||||||
ENV GO111MODULE=on
|
ENV GO111MODULE=on
|
||||||
|
|
||||||
|
# the node image includes a non-root user with sudo access. 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).
|
||||||
|
# See https://aka.ms/vscode-remote/containers/non-root-user for details.
|
||||||
|
ARG USERNAME=neko
|
||||||
|
ARG USER_UID=1000
|
||||||
|
ARG USER_GID=$USER_UID
|
||||||
|
|
||||||
|
# set to false to skip installing zsh and Oh My ZSH!
|
||||||
|
ARG INSTALL_ZSH="true"
|
||||||
|
|
||||||
|
# location and expected SHA for common setup script - SHA generated on release
|
||||||
|
ARG COMMON_SCRIPT_SOURCE="https://raw.githubusercontent.com/microsoft/vscode-dev-containers/master/script-library/common-debian.sh"
|
||||||
|
ARG COMMON_SCRIPT_SHA="dev-mode"
|
||||||
|
|
||||||
|
# configure apt and install packages
|
||||||
|
RUN apt-get update \
|
||||||
|
&& apt-get -y install --no-install-recommends apt-utils x11vnc libxtst-dev openssl dialog wget ca-certificates 2>&1 \
|
||||||
|
#
|
||||||
|
# verify git, common tools / libs installed, add/modify non-root user, optionally install zsh
|
||||||
|
&& wget -q -O /tmp/common-setup.sh $COMMON_SCRIPT_SOURCE \
|
||||||
|
&& if [ "$COMMON_SCRIPT_SHA" != "dev-mode" ]; then echo "$COMMON_SCRIPT_SHA /tmp/common-setup.sh" | sha256sum -c - ; fi \
|
||||||
|
&& /bin/bash /tmp/common-setup.sh "$INSTALL_ZSH" "$USERNAME" "$USER_UID" "$USER_GID" \
|
||||||
|
&& rm /tmp/common-setup.sh \
|
||||||
|
#
|
||||||
|
# install docker
|
||||||
|
&& apt-get install -y apt-transport-https gnupg-agent software-properties-common lsb-release \
|
||||||
|
&& curl -fsSL https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/gpg | (OUT=$(apt-key add - 2>&1) || echo $OUT) \
|
||||||
|
&& add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]') $(lsb_release -cs) stable" \
|
||||||
|
&& apt-get update && apt-get install -y docker-ce-cli \
|
||||||
|
#
|
||||||
|
# install docker compose
|
||||||
|
&& curl -sSL "https://github.com/docker/compose/releases/download/${COMPOSE_VERSION}/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose \
|
||||||
|
&& chmod +x /usr/local/bin/docker-compose \
|
||||||
|
#
|
||||||
|
# set alternate global install location that both users have rights to access
|
||||||
|
&& mkdir -p /usr/local/share/npm-global \
|
||||||
|
&& chown ${USERNAME}:root /usr/local/share/npm-global \
|
||||||
|
&& npm config -g set prefix /usr/local/share/npm-global \
|
||||||
|
&& sudo -u ${USERNAME} npm config -g set prefix /usr/local/share/npm-global
|
||||||
|
|
||||||
|
# switch back to dialog for any ad-hoc use of apt-get
|
||||||
|
ENV DEBIAN_FRONTEND=dialog
|
@ -5,7 +5,7 @@
|
|||||||
"workspaceFolder": "/workspace",
|
"workspaceFolder": "/workspace",
|
||||||
"remoteUser": "neko",
|
"remoteUser": "neko",
|
||||||
"settings": {
|
"settings": {
|
||||||
"terminal.integrated.shell.linux": "/bin/ash",
|
"terminal.integrated.shell.linux": "/bin/bash",
|
||||||
"go.gopath": "/go"
|
"go.gopath": "/go"
|
||||||
},
|
},
|
||||||
"extensions": [
|
"extensions": [
|
||||||
|
@ -1,17 +1,15 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
cd ../server
|
cd ../server \
|
||||||
go get && ./build
|
&& go get \
|
||||||
|
&& ./build \
|
||||||
cd ../client
|
&& cd ../client \
|
||||||
npm install && npm run build
|
&& npm install && npm run build \
|
||||||
|
&& cd ../ \
|
||||||
cd ../
|
&& sudo docker build -f Dockerfile -t nurdism/neko . \
|
||||||
sudo docker build -f Dockerfile -t nurdism/neko .
|
&& sudo docker images nurdism/neko
|
||||||
|
|
||||||
|
# sudo docker images nurdism/neko
|
||||||
# sudo docker push nurdism/neko:latest
|
# sudo docker push nurdism/neko:latest
|
||||||
# sudo docker run -e NEKO_BIND='0.0.0.0:9000' --network host --shm-size=1gb nurdism/neko:latest
|
# sudo docker run -p 80:8080 -p 59000-59100:59000-59100/udp --shm-size=1gb nurdism/neko:latest
|
||||||
# sudo docker run -p 9000:8080 -p 59000-59100:59000-59100/udp --shm-size=2gb nurdism/neko:latest
|
|
||||||
# sudo docker run -p 8080:8080 --shm-size=1gb nurdism/neko:latest
|
|
||||||
# sudo docker run --network host --shm-size=1gb nurdism/neko:latest
|
|
||||||
# sudo docker run --network host --shm-size=1gb -it nurdism/neko:latest /bin/bash
|
# sudo docker run --network host --shm-size=1gb -it nurdism/neko:latest /bin/bash
|
@ -1,4 +1,11 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
rm -rf /var/run/dbus.pid
|
if [ ! -d /var/run/dbus ]; then
|
||||||
|
mkdir -p /var/run/dbus
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f /var/run/dbus.pid ]; then
|
||||||
|
rm -f /var/run/dbus.pid
|
||||||
|
fi
|
||||||
|
|
||||||
/usr/bin/dbus-daemon --nofork --print-pid --config-file=/usr/share/dbus-1/system.conf
|
/usr/bin/dbus-daemon --nofork --print-pid --config-file=/usr/share/dbus-1/system.conf
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"policies": {
|
"policies": {
|
||||||
"BlockAboutAddons": true,
|
"BlockAboutAddons": false,
|
||||||
"BlockAboutConfig": true,
|
"BlockAboutConfig": true,
|
||||||
"BlockAboutProfiles": true,
|
"BlockAboutProfiles": true,
|
||||||
"BlockAboutSupport": true,
|
"BlockAboutSupport": true,
|
||||||
@ -28,7 +28,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Title": "9Anime",
|
"Title": "9Anime",
|
||||||
"URL": "https://9anime.xyz/",
|
"URL": "https://9anime.to/",
|
||||||
"Favicon": "https://staticf.akacdn.ru/assets/favicons/favicon.png",
|
"Favicon": "https://staticf.akacdn.ru/assets/favicons/favicon.png",
|
||||||
"Folder": "Media",
|
"Folder": "Media",
|
||||||
"Placement": "toolbar"
|
"Placement": "toolbar"
|
||||||
@ -93,7 +93,7 @@
|
|||||||
"CaptivePortal": false,
|
"CaptivePortal": false,
|
||||||
"DisableAppUpdate": true,
|
"DisableAppUpdate": true,
|
||||||
"DisableBuiltinPDFViewer": true,
|
"DisableBuiltinPDFViewer": true,
|
||||||
"DisableDeveloperTools": true,
|
"DisableDeveloperTools": false,
|
||||||
"DisableFeedbackCommands": true,
|
"DisableFeedbackCommands": true,
|
||||||
"DisableFirefoxAccounts": true,
|
"DisableFirefoxAccounts": true,
|
||||||
"DisableFirefoxScreenshots": true,
|
"DisableFirefoxScreenshots": true,
|
||||||
@ -119,6 +119,10 @@
|
|||||||
"*": {
|
"*": {
|
||||||
"installation_mode": "blocked"
|
"installation_mode": "blocked"
|
||||||
},
|
},
|
||||||
|
"nordvpnproxy@nordvpn.com": {
|
||||||
|
"install_url": "https://addons.mozilla.org/firefox/downloads/latest/nordvpn-proxy-extension/latest.xpi",
|
||||||
|
"installation_mode": "force_installed"
|
||||||
|
},
|
||||||
"uBlock0@raymondhill.net": {
|
"uBlock0@raymondhill.net": {
|
||||||
"install_url": "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi",
|
"install_url": "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi",
|
||||||
"installation_mode": "force_installed"
|
"installation_mode": "force_installed"
|
||||||
|
@ -36,7 +36,7 @@ user=%(ENV_USER)s
|
|||||||
|
|
||||||
[program:firefox-esr]
|
[program:firefox-esr]
|
||||||
environment=HOME="/home/%(ENV_USER)s",USER="%(ENV_USER)s"
|
environment=HOME="/home/%(ENV_USER)s",USER="%(ENV_USER)s"
|
||||||
command=/usr/lib/firefox/firefox --display=%(ENV_DISPLAY)s --setDefaultBrowser -width %(ENV_SCREEN_WIDTH)s -height %(ENV_SCREEN_HEIGHT)s
|
command=/usr/lib/firefox-esr/firefox-esr --display=%(ENV_DISPLAY)s --setDefaultBrowser -width %(ENV_SCREEN_WIDTH)s -height %(ENV_SCREEN_HEIGHT)s
|
||||||
autorestart=true
|
autorestart=true
|
||||||
priority=400
|
priority=400
|
||||||
user=%(ENV_USER)s
|
user=%(ENV_USER)s
|
||||||
|
@ -36,7 +36,7 @@ user=%(ENV_USER)s
|
|||||||
|
|
||||||
[program:firefox-esr]
|
[program:firefox-esr]
|
||||||
environment=HOME="/home/%(ENV_USER)s",USER="%(ENV_USER)s"
|
environment=HOME="/home/%(ENV_USER)s",USER="%(ENV_USER)s"
|
||||||
command=/usr/lib/firefox/firefox --display=%(ENV_DISPLAY)s --setDefaultBrowser -width %(ENV_SCREEN_WIDTH)s -height %(ENV_SCREEN_HEIGHT)s
|
command=/usr/lib/firefox-esr/firefox-esr --display=%(ENV_DISPLAY)s --setDefaultBrowser -width %(ENV_SCREEN_WIDTH)s -height %(ENV_SCREEN_HEIGHT)s
|
||||||
autorestart=true
|
autorestart=true
|
||||||
priority=400
|
priority=400
|
||||||
user=%(ENV_USER)s
|
user=%(ENV_USER)s
|
34
.docker/test
34
.docker/test
@ -2,6 +2,11 @@
|
|||||||
|
|
||||||
# usefull debugging tools pavucontrol htop x11vnc
|
# usefull debugging tools pavucontrol htop x11vnc
|
||||||
|
|
||||||
|
if [[ $EUID -ne 0 ]]; then
|
||||||
|
echo "This script must be run as root"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# if [ ! -f ../server/bin/neko ]; then
|
# if [ ! -f ../server/bin/neko ]; then
|
||||||
# echo "build server before testing"
|
# echo "build server before testing"
|
||||||
# exit 1
|
# exit 1
|
||||||
@ -15,30 +20,39 @@
|
|||||||
sudo mkdir -p /var/run/dbus /etc/neko
|
sudo mkdir -p /var/run/dbus /etc/neko
|
||||||
sudo rm -rf /var/run/dbus.pid
|
sudo rm -rf /var/run/dbus.pid
|
||||||
|
|
||||||
sudo cp files/firefox/neko.js /usr/lib/firefox/mozilla.cfg
|
sudo cp files/firefox-esr/neko.js /usr/lib/firefox-esr/mozilla.cfg
|
||||||
sudo cp files/firefox/autoconfig.js /usr/lib/firefox/defaults/pref/autoconfig.js
|
#sudo rm -f /usr/lib/firefox-esr/mozilla.cfg
|
||||||
sudo cp files/firefox/policies.json /usr/lib/firefox/distribution/policies.json
|
|
||||||
|
sudo cp files/firefox-esr/autoconfig.js /usr/lib/firefox-esr/defaults/pref/autoconfig.js
|
||||||
|
#sudo rm -f /usr/lib/firefox-esr/defaults/pref/autoconfig.js
|
||||||
|
|
||||||
|
sudo cp files/firefox-esr/policies.json /usr/lib/firefox-esr/distribution/policies.json
|
||||||
|
#sudo rm -f /usr/lib/firefox-esr/distribution/policies.json
|
||||||
|
|
||||||
sudo cp files/dbus /usr/bin/dbus
|
sudo cp files/dbus /usr/bin/dbus
|
||||||
sudo cp files/default.pa /etc/pulse/default.pa
|
sudo cp files/default.pa /etc/pulse/default.pa
|
||||||
sudo cp files/supervisord.conf /etc/neko/supervisord.conf
|
sudo cp files/supervisord.conf /etc/neko/supervisord.conf
|
||||||
sudo cp files/openbox.xml /etc/neko/openbox.xml
|
sudo cp files/openbox.xml /etc/neko/openbox.xml
|
||||||
|
|
||||||
if [ ! -f /usr/lib/firefox/distribution/extensions/uBlock0@raymondhill.net.xpi ]; then
|
|
||||||
sudo mkdir -p /usr/lib/firefox/distribution/extensions
|
sudo mkdir -p /usr/lib/firefox/distribution/extensions
|
||||||
|
|
||||||
|
if [ ! -f /usr/lib/firefox/distribution/extensions/uBlock0@raymondhill.net.xpi ]; then
|
||||||
sudo curl -o /usr/lib/firefox/distribution/extensions/uBlock0@raymondhill.net.xpi https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/addon-607454-latest.xpi
|
sudo curl -o /usr/lib/firefox/distribution/extensions/uBlock0@raymondhill.net.xpi https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/addon-607454-latest.xpi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ ! -f /usr/lib/firefox/distribution/extensions/nordvpnproxy@nordvpn.com.xpi ]; then
|
||||||
|
sudo curl -o /usr/lib/firefox/distribution/extensions/nordvpnproxy@nordvpn.com.xpi https://addons.mozilla.org/firefox/downloads/latest/nordvpn-proxy-extension/latest.xpi
|
||||||
|
fi
|
||||||
|
|
||||||
sudo cp ../server/bin/neko /usr/bin/neko
|
sudo cp ../server/bin/neko /usr/bin/neko
|
||||||
sudo cp -R ../client/dist /var/www/
|
sudo cp -R ../client/dist /var/www/
|
||||||
|
|
||||||
sudo rm -rf $HOME/.mozilla
|
sudo rm -rf $HOME/.mozilla
|
||||||
sudo rm -rf /var/run/supervisord.pid
|
|
||||||
|
|
||||||
mkdir -p $HOME/.config/pulse
|
mkdir -p $HOME/.config/pulse
|
||||||
echo "default-server=unix:/tmp/pulseaudio.socket" > $HOME/.config/pulse/client.conf
|
echo "default-server=unix:/tmp/pulseaudio.socket" > $HOME/.config/pulse/client.conf
|
||||||
|
|
||||||
export USER=vscode
|
export USER=neko
|
||||||
export SCREEN_WIDTH=1280
|
export SCREEN_WIDTH=1280
|
||||||
export SCREEN_HEIGHT=720
|
export SCREEN_HEIGHT=720
|
||||||
export SCREEN_DEPTH=24
|
export SCREEN_DEPTH=24
|
||||||
@ -49,4 +63,12 @@ export NEKO_BIND=:8080
|
|||||||
export NEKO_KEY=
|
export NEKO_KEY=
|
||||||
export NEKO_CERT=
|
export NEKO_CERT=
|
||||||
|
|
||||||
|
if [ -f /var/run/supervisord.pid ]; then
|
||||||
|
sudo rm -f /var/run/supervisord.pid
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f supervisord.log ]; then
|
||||||
|
sudo rm -f supervisord.log
|
||||||
|
fi
|
||||||
|
|
||||||
supervisord --configuration ./supervisord.conf
|
supervisord --configuration ./supervisord.conf
|
110
Dockerfile
110
Dockerfile
@ -1,79 +1,70 @@
|
|||||||
FROM frolvlad/alpine-glibc
|
FROM debian:stretch-slim
|
||||||
|
|
||||||
ENV GST_VERSION=1.16.2
|
# avoid warnings by switching to noninteractive
|
||||||
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
ENV GSTPATH /gst
|
||||||
|
ENV GST_VERSION 1.16
|
||||||
|
|
||||||
# build gstreamer
|
# build gstreamer
|
||||||
RUN apk add --no-cache --virtual .gst-build-deps \
|
RUN set -eux && \
|
||||||
build-base bison flex perl python glib-dev zlib-dev \
|
apt-get update && apt-get install -y --no-install-recommends \
|
||||||
opus-dev \
|
git ca-certificates build-essential perl python pkg-config autoconf automake autopoint libtool bison flex \
|
||||||
pulseaudio-dev libx11-dev libxv-dev libxt-dev libxfixes-dev libvpx-dev \
|
gettext nasm openssl libglib2.0-dev libopus-dev libvpx-dev libpulse-dev libx11-dev libxv-dev libxt-dev \
|
||||||
git nasm openssl-dev \
|
libxtst-dev libxfixes-dev libssl-dev \
|
||||||
#
|
## set up dir
|
||||||
# build gstreamer
|
&& mkdir $GSTPATH \
|
||||||
&& cd /tmp \
|
|
||||||
&& wget "https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-$GST_VERSION.tar.xz" \
|
|
||||||
&& tar xvfJ "gstreamer-$GST_VERSION.tar.xz" > /dev/null \
|
|
||||||
&& cd "gstreamer-$GST_VERSION" \
|
|
||||||
&& ./configure --prefix=/usr \
|
|
||||||
&& make && make install \
|
|
||||||
&& cd /tmp && rm -rf "gstreamer-$GST_VERSION" \
|
|
||||||
#
|
|
||||||
# build gst-plugins-base
|
|
||||||
&& wget "https://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-$GST_VERSION.tar.xz" \
|
|
||||||
&& tar xvfJ "gst-plugins-base-$GST_VERSION.tar.xz" > /dev/null \
|
|
||||||
&& cd "gst-plugins-base-$GST_VERSION" \
|
|
||||||
&& ./configure --prefix=/usr \
|
|
||||||
&& make && make install \
|
|
||||||
&& cd /tmp && rm -rf "gst-plugins-base-$GST_VERSION" \
|
|
||||||
#
|
|
||||||
# build gst-plugins-good
|
|
||||||
&& wget "https://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-$GST_VERSION.tar.xz" \
|
|
||||||
&& tar xvfJ "gst-plugins-good-$GST_VERSION.tar.xz" > /dev/null \
|
|
||||||
&& cd "gst-plugins-good-$GST_VERSION" \
|
|
||||||
&& ./configure --prefix=/usr \
|
|
||||||
&& make && make install \
|
|
||||||
&& cd /tmp && rm -rf "gst-plugins-good-$GST_VERSION" \
|
|
||||||
#
|
#
|
||||||
# build openh264
|
# build openh264
|
||||||
|
&& cd $GSTPATH \
|
||||||
&& git clone https://github.com/cisco/openh264.git \
|
&& git clone https://github.com/cisco/openh264.git \
|
||||||
&& cd openh264 \
|
&& cd openh264 \
|
||||||
&& make && make install \
|
&& make && make install \
|
||||||
&& cd /tmp && rm -rf openh264 \
|
&& cd $GSTPATH && rm -rf openh264 \
|
||||||
#
|
#
|
||||||
# build gst-plugins-bad
|
# build gstreamer
|
||||||
&& wget "https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-$GST_VERSION.tar.xz" \
|
&& for MODULE in \
|
||||||
&& tar xvfJ "gst-plugins-bad-$GST_VERSION.tar.xz" > /dev/null \
|
gstreamer \
|
||||||
&& cd "gst-plugins-bad-$GST_VERSION" \
|
gst-plugins-base \
|
||||||
&& ./configure --prefix=/usr \
|
gst-plugins-good \
|
||||||
&& make && make install \
|
gst-plugins-bad \
|
||||||
&& cd /tmp && rm -rf "gst-plugins-bad-$GST_VERSION" \
|
; do \
|
||||||
|
git clone git://anongit.freedesktop.org/gstreamer/$MODULE; \
|
||||||
|
cd $MODULE; \
|
||||||
|
git checkout $GST_VERSION; \
|
||||||
|
PATH=$GSTPATH/local/bin:$PATH PKG_CONFIG_PATH=$GSTPATH/local/lib/pkgconfig ./autogen.sh --prefix $GSTPATH/local --disable-gtk-doc; \
|
||||||
|
make && make install; \
|
||||||
|
cd $GSTPATH && rm -rf $MODULE; \
|
||||||
|
done \
|
||||||
#
|
#
|
||||||
# remove build deps
|
# remove build deps
|
||||||
&& apk del .gst-build-deps
|
&& apt-get --purge autoremove -y build-essential perl python pkg-config autoconf automake autopoint libtool bison flex \
|
||||||
|
gettext nasm openssl libglib2.0-dev libopus-dev libvpx-dev libpulse-dev libx11-dev libxv-dev libxt-dev \
|
||||||
|
libxtst-dev libxfixes-dev libssl-dev
|
||||||
|
|
||||||
|
ENV PATH=$GSTPATH/local/bin:$PATH
|
||||||
|
ENV LD_LIBRARY_PATH=$GSTPATH/local/lib:$LD_LIBRARY_PATH
|
||||||
|
ENV PKG_CONFIG_PATH=$GSTPATH/local/lib/pkgconfig:$PKG_CONFIG_PATH
|
||||||
|
|
||||||
ARG USERNAME=neko
|
ARG USERNAME=neko
|
||||||
ARG USER_UID=1000
|
ARG USER_UID=1000
|
||||||
ARG USER_GID=$USER_UID
|
ARG USER_GID=$USER_UID
|
||||||
|
|
||||||
# RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories
|
|
||||||
# RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories
|
|
||||||
# RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
|
|
||||||
|
|
||||||
# install neko dependencies
|
# install neko dependencies
|
||||||
RUN apk add --no-cache supervisor openbox dbus-x11 xvfb pulseaudio alsa-plugins-pulse opus libvpx libxv libxtst libxfixes xclip ttf-freefont \
|
RUN set -eux \
|
||||||
&& apk add --no-cache libevent --repository "http://dl-cdn.alpinelinux.org/alpine/edge/main" \
|
&& apt-get update && apt-get install -y --no-install-recommends wget ca-certificates pulseaudio openbox dbus-x11 xvfb libxv1 xclip firefox-esr supervisor \
|
||||||
&& apk add --no-cache firefox-esr --repository "http://dl-cdn.alpinelinux.org/alpine/edge/community" \
|
|
||||||
#
|
#
|
||||||
# create a non-root user
|
# create a non-root user
|
||||||
&& addgroup -g $USER_GID $USERNAME \
|
&& groupadd --gid $USER_GID $USERNAME \
|
||||||
&& adduser -D -u $USER_UID -G $USERNAME -s /bin/ash -h /home/$USERNAME $USERNAME \
|
&& useradd --uid $USER_UID --gid $USERNAME --shell /bin/bash --create-home $USERNAME \
|
||||||
&& adduser $USERNAME audio \
|
&& adduser $USERNAME audio \
|
||||||
&& adduser $USERNAME video \
|
&& adduser $USERNAME video \
|
||||||
&& adduser $USERNAME pulse \
|
&& adduser $USERNAME pulse \
|
||||||
#
|
#
|
||||||
# install uBlock
|
# install extensions
|
||||||
&& mkdir -p /usr/lib/firefox/distribution/extensions \
|
&& mkdir -p /usr/lib/firefox-esr/distribution/extensions \
|
||||||
&& wget -O /usr/lib/firefox/distribution/extensions/uBlock0@raymondhill.net.xpi https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/addon-607454-latest.xpi \
|
&& wget -O /usr/lib/firefox-esr/distribution/extensions/uBlock0@raymondhill.net.xpi https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi \
|
||||||
|
&& wget -O /usr/lib/firefox-esr/distribution/extensions/nordvpnproxy@nordvpn.com.xpi https://addons.mozilla.org/firefox/downloads/latest/nordvpn-proxy-extension/latest.xpi \
|
||||||
#
|
#
|
||||||
# setup pulseaudio
|
# setup pulseaudio
|
||||||
&& mkdir -p /home/$USERNAME/.config/pulse/ \
|
&& mkdir -p /home/$USERNAME/.config/pulse/ \
|
||||||
@ -84,7 +75,12 @@ RUN apk add --no-cache supervisor openbox dbus-x11 xvfb pulseaudio alsa-plugins-
|
|||||||
&& mkdir /tmp/.X11-unix && chmod 1777 /tmp/.X11-unix && chown $USERNAME /tmp/.X11-unix/ \
|
&& mkdir /tmp/.X11-unix && chmod 1777 /tmp/.X11-unix && chown $USERNAME /tmp/.X11-unix/ \
|
||||||
#
|
#
|
||||||
# make directories for neko
|
# make directories for neko
|
||||||
&& mkdir -p /etc/neko /var/www
|
&& mkdir -p /etc/neko /var/www \
|
||||||
|
#
|
||||||
|
# clean up
|
||||||
|
&& apt-get autoremove -y \
|
||||||
|
&& apt-get clean -y \
|
||||||
|
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/*
|
||||||
|
|
||||||
#
|
#
|
||||||
# env
|
# env
|
||||||
@ -100,9 +96,9 @@ COPY .docker/files/dbus /usr/bin/dbus
|
|||||||
COPY .docker/files/openbox.xml /etc/neko/openbox.xml
|
COPY .docker/files/openbox.xml /etc/neko/openbox.xml
|
||||||
COPY .docker/files/supervisord.conf /etc/neko/supervisord.conf
|
COPY .docker/files/supervisord.conf /etc/neko/supervisord.conf
|
||||||
COPY .docker/files/default.pa /etc/pulse/default.pa
|
COPY .docker/files/default.pa /etc/pulse/default.pa
|
||||||
COPY .docker/files/firefox/neko.js /usr/lib/firefox/mozilla.cfg
|
COPY .docker/files/firefox/neko.js /usr/lib/firefox-esr/mozilla.cfg
|
||||||
COPY .docker/files/firefox/autoconfig.js /usr/lib/firefox/defaults/pref/autoconfig.js
|
COPY .docker/files/firefox/autoconfig.js /usr/lib/firefox-esr/defaults/pref/autoconfig.js
|
||||||
COPY .docker/files/firefox/policies.json /usr/lib/firefox/distribution/policies.json
|
COPY .docker/files/firefox/policies.json /usr/lib/firefox-esr/distribution/policies.json
|
||||||
|
|
||||||
#
|
#
|
||||||
# neko files
|
# neko files
|
||||||
|
13
README.md
13
README.md
@ -49,15 +49,16 @@ sudo docker run -p 8080:8080 -e NEKO_PASSWORD='secret' -e NEKO_ADMIN='secret' --
|
|||||||
|
|
||||||
### Config
|
### Config
|
||||||
```
|
```
|
||||||
NEKO_USER=$USERNAME // User
|
SCREEN_WIDTH=1280 // Display width
|
||||||
NEKO_DISPLAY=0 // Display number
|
SCREEN_HEIGHT=720 // Display height
|
||||||
NEKO_WIDTH=1280 // Display width
|
SCREEN_DEPTH=24 // Display bit depth
|
||||||
NEKO_HEIGHT=720 // Display height
|
DISPLAY=:99.0 // Display number
|
||||||
|
|
||||||
NEKO_PASSWORD=neko // Password
|
NEKO_PASSWORD=neko // Password
|
||||||
NEKO_ADMIN=neko // Admin Password
|
NEKO_ADMIN=neko // Admin Password
|
||||||
NEKO_BIND=0.0.0.0:8080 // Bind
|
NEKO_BIND=0.0.0.0:8080 // Bind
|
||||||
NEKO_KEY= // (SSL)Key
|
NEKO_KEY= // (SSL)Key, needed for clipboard sync
|
||||||
NEKO_CERT= // (SSL)Cert
|
NEKO_CERT= // (SSL)Cert, needed for clipboard sync
|
||||||
```
|
```
|
||||||
|
|
||||||
### Development
|
### Development
|
||||||
|
@ -1,14 +1,16 @@
|
|||||||
version: '2.0'
|
version: "2.0"
|
||||||
services:
|
services:
|
||||||
neko:
|
neko:
|
||||||
image: nurdism/neko
|
image: nurdism/neko
|
||||||
restart: always
|
restart: always
|
||||||
shm_size: '2gb'
|
shm_size: "1gb"
|
||||||
ports:
|
ports:
|
||||||
- "80:8080"
|
- "80:8080"
|
||||||
environment:
|
environment:
|
||||||
NEKO_DISPLAY: 0
|
DISPLAY: :99.0
|
||||||
NEKO_WIDTH: 1280
|
SCREEN_WIDTH: 1280
|
||||||
NEKO_HEIGHT: 720
|
SCREEN_HEIGHT: 720
|
||||||
|
SCREEN_DEPTH: 24
|
||||||
NEKO_PASSWORD: neko
|
NEKO_PASSWORD: neko
|
||||||
|
NEKO_ADMIN: admin
|
||||||
NEKO_BIND: :8080
|
NEKO_BIND: :8080
|
@ -43,10 +43,5 @@
|
|||||||
"swyphcosmo.spellchecker",
|
"swyphcosmo.spellchecker",
|
||||||
"eamodio.gitlens"
|
"eamodio.gitlens"
|
||||||
],
|
],
|
||||||
"files.associations": {
|
|
||||||
"iostream": "cpp",
|
|
||||||
"xtest.h": "c",
|
|
||||||
"xlib.h": "c"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -31,6 +31,11 @@ import (
|
|||||||
gstreamer1.0-x \
|
gstreamer1.0-x \
|
||||||
gstreamer1.0-alsa \
|
gstreamer1.0-alsa \
|
||||||
gstreamer1.0-pulseaudio
|
gstreamer1.0-pulseaudio
|
||||||
|
|
||||||
|
gst-inspect-1.0 --version
|
||||||
|
gst-inspect-1.0 plugin
|
||||||
|
gst-launch-1.0 ximagesrc show-pointer=true use-damage=false ! video/x-raw,framerate=30/1 ! videoconvert ! queue ! vp8enc error-resilient=partitions keyframe-max-dist=10 auto-alt-ref=true cpu-used=5 deadline=1 ! autovideosink
|
||||||
|
gst-launch-1.0 pulsesrc ! audioconvert ! opusenc ! autoaudiosink
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Pipeline is a wrapper for a GStreamer Pipeline
|
// Pipeline is a wrapper for a GStreamer Pipeline
|
||||||
|
Reference in New Issue
Block a user