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:
parent
f3927340ea
commit
10d30433cf
|
@ -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
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
version: '3'
|
||||
|
||||
services:
|
||||
web:
|
||||
build:
|
||||
context: .
|
||||
target: with-fly
|
||||
|
||||
worker:
|
||||
build:
|
||||
context: .
|
||||
target: with-fly
|
||||
|
Loading…
Reference in New Issue