Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
zheng1 authored Aug 24, 2020
1 parent 0584f06 commit d33b133
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
FROM openpitrix/openpitrix-builder as builder

WORKDIR /go/src/openpitrix.io/Jobs/
WORKDIR /go/src/github.com/openpitrix/ks-auto-migrate/
COPY . .

RUN mkdir -p /release_bin
RUN GOPROXY=https://goproxy.io CGO_ENABLED=0 GOBIN=/release_bin go install -ldflags '-w -s' -tags netgo openpitrix.io/Jobs/cmd/...
RUN CGO_ENABLED=0 GOBIN=/release_bin go install -ldflags '-w -s' -tags netgo github.com/openpitrix/ks-auto-migrate/cmd/...


FROM alpine:3.7
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
RUN apk add --update ca-certificates && update-ca-certificates
COPY --from=builder /usr/local/go/lib/time/zoneinfo.zip /usr/local/go/lib/time/zoneinfo.zip
COPY --from=builder /release_bin/* /usr/local/bin/
COPY --from=builder /release_bin/* /usr/local/bin/

0 comments on commit d33b133

Please sign in to comment.