From 17c5173d8b531c8444681817a1cbab3f31c19e7b Mon Sep 17 00:00:00 2001 From: Asher Date: Tue, 17 Sep 2019 14:00:51 -0500 Subject: [PATCH] Use --build-arg for GitHub token --- .travis.yml | 2 +- Dockerfile | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index f8f400362..4cee99dcf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,7 +36,7 @@ jobs: dist: trusty env: DOCKER_BUILD="true" if: branch == master AND tag IS blank - script: docker build -e GITHUB_TOKEN="$GITHUB_TOKEN" --build-arg codeServerVersion="$VERSION" --build-arg vscodeVersion="$VSCODE_VERSION" -t codercom/code-server:"$VERSION" -t codercom/code-server:v2 . + script: docker build --build-arg githubToken="$GITHUB_TOKEN" --build-arg codeServerVersion="$VERSION" --build-arg vscodeVersion="$VSCODE_VERSION" -t codercom/code-server:"$VERSION" -t codercom/code-server:v2 . git: depth: 3 diff --git a/Dockerfile b/Dockerfile index 08c64284c..031b52b67 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,7 @@ FROM node:10.16.0 ARG codeServerVersion=docker ARG vscodeVersion +ARG githubToken # Install VS Code's deps. These are the only two it seems we need. RUN apt-get update && apt-get install -y \ @@ -14,7 +15,7 @@ WORKDIR /src COPY . . RUN yarn \ - && MINIFY=true yarn build "${vscodeVersion}" "${codeServerVersion}" \ + && MINIFY=true GITHUB_TOKEN="${githubToken}" yarn build "${vscodeVersion}" "${codeServerVersion}" \ && yarn binary "${vscodeVersion}" "${codeServerVersion}" \ && mv "/src/build/code-server${codeServerVersion}-vsc${vscodeVersion}-linux-x86_64-built/code-server${codeServerVersion}-vsc${vscodeVersion}-linux-x86_64" /src/build/code-server \ && rm -r /src/build/vscode-* \