From 0c4a4b5ac92086cc06a4e8551c28128363e3f2c2 Mon Sep 17 00:00:00 2001 From: Erik Veld Date: Fri, 15 Sep 2023 16:02:01 +0200 Subject: [PATCH] Switch to coder --- coder/Dockerfile.base | 24 ++++++++++++++++++++++++ coder/config/config.yaml | 9 +++++++++ coder/entrypoint.d/bounce.sh | 2 ++ coder/entrypoint.d/docs.sh | 9 +++++++++ vscode/Dockerfile.vscode | 8 -------- 5 files changed, 44 insertions(+), 8 deletions(-) create mode 100644 coder/Dockerfile.base create mode 100644 coder/config/config.yaml create mode 100644 coder/entrypoint.d/bounce.sh create mode 100644 coder/entrypoint.d/docs.sh diff --git a/coder/Dockerfile.base b/coder/Dockerfile.base new file mode 100644 index 0000000..95a832c --- /dev/null +++ b/coder/Dockerfile.base @@ -0,0 +1,24 @@ +FROM envoyproxy/envoy:v1.20.1 as envoy + +FROM codercom/code-server:4.16.1-debian + +ARG TARGETARCH + +RUN sudo apt update && sudo apt install -y \ + curl wget zip git jq build-essential software-properties-common fonts-hack-ttf + + # Install jumppad validate +RUN curl -L -o validate.zip https://github.com/jumppad-labs/validate/releases/download/v0.1.0/validate-linux-${TARGETARCH}.zip && \ + unzip validate.zip && \ + sudo mv validate-linux-${TARGETARCH} /usr/bin/validate && \ + rm validate.zip + +# Install jumppad bounce +RUN curl -L -o bounce.zip https://github.com/jumppad-labs/bounce/releases/download/v0.1.0/bounce-linux-${TARGETARCH}.zip && \ + unzip bounce.zip && \ + sudo mv bounce-linux-${TARGETARCH} /usr/bin/bounce && \ + rm bounce.zip + +COPY config/config.yaml /home/coder/.config/code-server/config.yaml + +COPY entrypoint.d/* ${ENTRYPOINTD}/ \ No newline at end of file diff --git a/coder/config/config.yaml b/coder/config/config.yaml new file mode 100644 index 0000000..f225134 --- /dev/null +++ b/coder/config/config.yaml @@ -0,0 +1,9 @@ +bind-addr: 127.0.0.1:8080 +auth: none +cert: false +disable-telemetry: true +disable-update-check: true +disable-workspace-trust: true +disable-getting-started-override: true +ignore-last-opened: true +app-name: jumppad \ No newline at end of file diff --git a/coder/entrypoint.d/bounce.sh b/coder/entrypoint.d/bounce.sh new file mode 100644 index 0000000..035a04c --- /dev/null +++ b/coder/entrypoint.d/bounce.sh @@ -0,0 +1,2 @@ +#!/bin/bash +bounce install \ No newline at end of file diff --git a/coder/entrypoint.d/docs.sh b/coder/entrypoint.d/docs.sh new file mode 100644 index 0000000..8d62150 --- /dev/null +++ b/coder/entrypoint.d/docs.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# Replace the location of the terminal server with the environment vars +eval "echo \"$(cat ./envoy.yaml)\"" >> ./envoy_processed.yaml + +# Run the proxy server +nohup envoy --log-path /logs/envoy.log --log-level debug -c ./envoy_processed.yaml --service-cluster front-proxy & + +# Run docs in the background +npm run dev \ No newline at end of file diff --git a/vscode/Dockerfile.vscode b/vscode/Dockerfile.vscode index 050010a..9396b42 100644 --- a/vscode/Dockerfile.vscode +++ b/vscode/Dockerfile.vscode @@ -2,14 +2,6 @@ FROM ghcr.io/jumppad-labs/base:debian-v0.1.0 ARG TARGETARCH -#Install nodejs -# RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \ -# apt install -y nodejs - -# Install code server -# RUN curl -L https://aka.ms/install-vscode-server/setup.sh | sh -# RUN code-server serve-local --accept-server-license-terms --install-extension shipyard.shipyard - # Install coder/code-server RUN curl -fsSL https://code-server.dev/install.sh | sh