Update build step.

This commit is contained in:
Naoki Kosaka
2019-06-02 21:08:40 +09:00
parent 99c2525419
commit 6ca6c9aad0
7 changed files with 78 additions and 62 deletions

View File

@ -5,9 +5,9 @@ COPY . /Activity-Relay
RUN mkdir -p /rootfs/usr/bin && \
apk add -U --no-cache git && \
go build -o /rootfs/usr/bin/server . && \
go build -o /rootfs/usr/bin/worker ./worker && \
go build -o /rootfs/usr/bin/ar-cli ./cli
go build -o /rootfs/usr/bin/server -ldflags "-X main.version=$(git describe --tags HEAD)" . && \
go build -o /rootfs/usr/bin/worker -ldflags "-X main.version=$(git describe --tags HEAD)" ./worker && \
go build -o /rootfs/usr/bin/ar-cli -ldflags "-X main.version=$(git describe --tags HEAD)" ./cli
FROM alpine