Disable Buildkit

This commit is contained in:
Vinicius Fortuna 2020-05-28 12:44:00 -04:00
parent 9cbde3927d
commit 87f9a44e94
2 changed files with 5 additions and 5 deletions

View file

@ -15,11 +15,10 @@
# Newer node images have no valid content trust data.
# Pin the image node:12.16.3-alpine (linux/amd64) by hash.
# See versions at https://hub.docker.com/_/node?tab=tags&name=alpine
ARG NODE_IMAGE="node@sha256:12b2154fb459fa5f42c54771524609db041e7ef3465935d0ca82940d2d72669d"
# Multi-stage build: use a build image to prevent bloating the shadowbox image with dependencies.
# Run `yarn` and build inside the container to package the right dependencies for the image.
FROM ${NODE_IMAGE} AS build
FROM node@sha256:12b2154fb459fa5f42c54771524609db041e7ef3465935d0ca82940d2d72669d AS build
RUN apk add --no-cache --upgrade bash
WORKDIR /
@ -36,7 +35,7 @@ COPY tsconfig.json ./
RUN ROOT_DIR=/ yarn do shadowbox/server/build
# shadowbox image
FROM ${NODE_IMAGE}
FROM node@sha256:12b2154fb459fa5f42c54771524609db041e7ef3465935d0ca82940d2d72669d
# Versions can be found at https://github.com/Jigsaw-Code/outline-ss-server/releases
ARG SS_VERSION=1.1.3
@ -60,10 +59,10 @@ RUN /etc/periodic/weekly/update_mmdb
WORKDIR /root/shadowbox
# Install shadowbox and third party dependencies.
COPY --from=build /build/shadowbox/app app
RUN mkdir bin && curl -SsL https://github.com/Jigsaw-Code/outline-ss-server/releases/download/v${SS_VERSION}/outline-ss-server_${SS_VERSION}_linux_x86_64.tar.gz | tar xz -C bin outline-ss-server
COPY third_party/prometheus/prometheus ./bin/
COPY src/shadowbox/package.json .
COPY --from=build /build/shadowbox/app app
# Create default state directory.
RUN mkdir -p /root/shadowbox/persisted-state

View file

@ -16,5 +16,6 @@
export DOCKER_CONTENT_TRUST=${DOCKER_CONTENT_TRUST:-1}
# Enable Docker BuildKit (https://docs.docker.com/develop/develop-images/build_enhancements)
export DOCKER_BUILDKIT=1
# TODO(fortuna): Re-enable after we figure out how to make it work on Travis.
# export DOCKER_BUILDKIT=1
docker build --force-rm --build-arg GITHUB_RELEASE="${TRAVIS_TAG:-none}" -t ${SB_IMAGE:-outline/shadowbox} $ROOT_DIR -f src/shadowbox/docker/Dockerfile