-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gomod: Update Dockerfile, remove Dockerfile.fast
The main Dockerfile supports dependencies caching now, rendering Dockerfile.fast useless. License: MIT Signed-off-by: Jakub Sztandera <[email protected]>
- Loading branch information
Showing
5 changed files
with
10 additions
and
88 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,22 +1,19 @@ | ||
FROM golang:1.11-stretch | ||
FROM golang:1.12-stretch | ||
MAINTAINER Lars Gierth <[email protected]> | ||
|
||
# There is a copy of this Dockerfile called Dockerfile.fast, | ||
# which is optimized for build time, instead of image size. | ||
# | ||
# Please keep these two Dockerfiles in sync. | ||
ENV SRC_DIR /go-ipfs | ||
|
||
ENV GX_IPFS "" | ||
ENV SRC_DIR /go/src/github.com/ipfs/go-ipfs | ||
# Download packages first so they can be cached. | ||
COPY go.mod go.sum $SRC_DIR/ | ||
RUN cd $SRC_DIR \ | ||
&& go mod download | ||
|
||
COPY . $SRC_DIR | ||
|
||
# Build the thing. | ||
# Also: fix getting HEAD commit hash via git rev-parse. | ||
# Also: allow using a custom IPFS API endpoint. | ||
RUN cd $SRC_DIR \ | ||
&& mkdir .git/objects \ | ||
&& ([ -z "$GX_IPFS" ] || echo $GX_IPFS > /root/.ipfs/api) \ | ||
&& make build | ||
|
||
# Get su-exec, a very minimal tool for dropping privileges, | ||
|
@@ -41,7 +38,7 @@ FROM busybox:1-glibc | |
MAINTAINER Lars Gierth <[email protected]> | ||
|
||
# Get the ipfs binary, entrypoint script, and TLS CAs from the build container. | ||
ENV SRC_DIR /go/src/github.com/ipfs/go-ipfs | ||
ENV SRC_DIR /go-ipfs | ||
COPY --from=0 $SRC_DIR/cmd/ipfs/ipfs /usr/local/bin/ipfs | ||
COPY --from=0 $SRC_DIR/bin/container_daemon /usr/local/bin/start_ipfs | ||
COPY --from=0 /tmp/su-exec/su-exec /sbin/su-exec | ||
|
This file was deleted.
Oops, something went wrong.
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
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