This repository has been archived by the owner on Dec 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 773
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1340 from lowzj/fix-docker-build
fix: pass GOPROXY to docker build
- Loading branch information
Showing
3 changed files
with
28 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,25 @@ | ||
FROM golang:1.12.10-alpine as builder | ||
|
||
WORKDIR /go/src/github.com/dragonflyoss/Dragonfly | ||
RUN apk --no-cache add bash make gcc libc-dev git | ||
|
||
COPY . /go/src/github.com/dragonflyoss/Dragonfly | ||
|
||
# make build dfdaemon and dfget. | ||
# write the resulting executable to the dir /opt/dragonfly/df-client. | ||
RUN make build-client && make install-client | ||
|
||
FROM alpine:3.8 | ||
|
||
RUN apk --no-cache add ca-certificates bash | ||
|
||
COPY --from=builder /opt/dragonfly/df-client /opt/dragonfly/df-client | ||
|
||
# dfdaemon will listen 65001 in default. | ||
EXPOSE 65001 | ||
|
||
# use the https://index.docker.io as default registry. | ||
CMD [ "--registry", "https://index.docker.io" ] | ||
|
||
ENTRYPOINT [ "/opt/dragonfly/df-client/dfdaemon" ] | ||
FROM golang:1.12.10-alpine as builder | ||
|
||
WORKDIR /go/src/github.com/dragonflyoss/Dragonfly | ||
RUN apk --no-cache add bash make gcc libc-dev git | ||
|
||
COPY . /go/src/github.com/dragonflyoss/Dragonfly | ||
|
||
# make build dfdaemon and dfget. | ||
# write the resulting executable to the dir /opt/dragonfly/df-client. | ||
ARG GOPROXY | ||
RUN make build-client && make install-client | ||
|
||
FROM alpine:3.8 | ||
|
||
RUN apk --no-cache add ca-certificates bash | ||
|
||
COPY --from=builder /opt/dragonfly/df-client /opt/dragonfly/df-client | ||
|
||
# dfdaemon will listen 65001 in default. | ||
EXPOSE 65001 | ||
|
||
# use the https://index.docker.io as default registry. | ||
CMD [ "--registry", "https://index.docker.io" ] | ||
|
||
ENTRYPOINT [ "/opt/dragonfly/df-client/dfdaemon" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters