diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index ffc27607..46dc3800 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -7,13 +7,10 @@ "vscode": { "settings": { "terminal.integrated.shell.linux": "/bin/bash", - "extensions": [ - "golang.go", - "dbaeumer.vscode-eslint", - "esbenp.prettier-vscode" - ] + "extensions": ["golang.go", "dbaeumer.vscode-eslint", "esbenp.prettier-vscode"] } } }, - "remoteUser": "wave" + "runServices": ["dbus"], + "postAttachCommand": "scripthaus run webpack-watch" } diff --git a/Dockerfile b/Dockerfile index c3200ce9..3c172a87 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,12 @@ FROM ubuntu:latest WORKDIR /app -RUN apt-get update -y && \ - apt-get upgrade -y && \ - apt-get install -y golang-go nodejs npm && \ - npm install -g corepack && \ - corepack enable && \ - yarn install && \ - apt-get install -y libgtk2.0-0t64 libgtk-3-0t64 libgbm-dev libnotify-dev libnss3 libxss1 libasound2t64 libxtst6 xauth xvfb && \ - export DISPLAY=:0 && \ - service dbus start +RUN apt update && \ + apt install -y golang-go nodejs npm libgtk2.0-0t64 libgtk-3-0t64 libgbm-dev libnotify-dev libnss3 libxss1 libasound2t64 libxtst6 xauth xvfb && \ + npm install -g corepack + +RUN corepack enable && \ + yarn install RUN git clone https://github.com/scripthaus-dev/scripthaus.git WORKDIR /app/scripthaus @@ -22,12 +19,7 @@ RUN mkdir waveterm WORKDIR /app/waveterm COPY . . -RUN yarn cache clean -RUN yarn -RUN scripthaus run electron-rebuild -RUN scripthaus run build-backend -RUN scripthaus run webpack-watch - -RUN useradd -m -s /bin/bash wave -USER wave +ENV GOFLAGS="-buildvcs=false" +ENV DISPLAY=":0" +RUN useradd -ms /bin/bash wave \ No newline at end of file