don't build fly binary by default

it can still be built via `docker build --target with-fly` or
`docker-compose -f docker-compose.yml -f hack/overrides/with-fly.yml up
--build`

Signed-off-by: Bohan Chen <bochen@pivotal.io>
This commit is contained in:
Bohan Chen 2021-05-20 17:19:32 -04:00
parent f3927340ea
commit 10d30433cf
2 changed files with 19 additions and 1 deletions

View File

@ -22,10 +22,15 @@ COPY . .
RUN go build -gcflags=all="-N -l" -o /usr/local/concourse/bin/concourse \
./cmd/concourse
# build 'fly' binary and update web CLI asset
# separate build target to build the linux fly binary
FROM base AS with-fly
RUN go build -ldflags '-extldflags "-static"' -o /tmp/fly ./fly && \
tar -C /tmp -czf /usr/local/concourse/fly-assets/fly-$(go env GOOS)-$(go env GOARCH).tgz fly && \
rm /tmp/fly
VOLUME /src
ENV CONCOURSE_WEB_PUBLIC_DIR=/src/web/public
# extend base stage with setup for local docker-compose workflow
FROM base

View File

@ -0,0 +1,13 @@
version: '3'
services:
web:
build:
context: .
target: with-fly
worker:
build:
context: .
target: with-fly