diff --git a/build/Dockerfile b/build/Dockerfile index 3a9b37d9..0deeb140 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -1,6 +1,6 @@ # This Docker container is used for testing on GCB. - -FROM golang:1.15 AS gobuilder +ARG GOVERSION=1 +FROM golang:${GOVERSION} AS gobuilder ENV GO111MODULE on ENV GOBIN /gobin @@ -26,7 +26,7 @@ COPY --from=gobuilder /usr/local/go /usr/local/go ENV PATH /workspace/vscodego/go/bin:/go/bin:/usr/local/go/bin:${PATH} ENV DEBIAN_FRONTEND noninteractive -RUN apt-get update && apt-get install -y libnss3 libgtk-3-dev libxss1 libasound2 xvfb libsecret-1-0 +RUN apt-get -qq update && apt-get install -qq -y libnss3 libgtk-3-dev libxss1 libasound2 xvfb libsecret-1-0 > /dev/null RUN npm install -g typescript vsce WORKDIR /workspace diff --git a/build/all.bash b/build/all.bash index 05bf37dc..c213d049 100755 --- a/build/all.bash +++ b/build/all.bash @@ -59,7 +59,8 @@ run_test() { run_test_in_docker() { echo "**** Building the docker image ***" - docker build -t vscode-test-env -f ./build/Dockerfile . + docker build -t vscode-test-env ${GOVERSION:+ --build-arg GOVERSION="${GOVERSION}"} -f ./build/Dockerfile . + # For debug tests, we need ptrace. docker run --cap-add SYS_PTRACE --workdir=/workspace -v "$(pwd):/workspace" vscode-test-env ci }