Skip to content

Commit

Permalink
gomod: Update Dockerfile, remove Dockerfile.fast
Browse files Browse the repository at this point in the history
The main Dockerfile supports dependencies caching now, rendering
Dockerfile.fast useless.

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
  • Loading branch information
Kubuxu committed Mar 19, 2019
1 parent 37db5be commit 1529bef
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 85 deletions.
17 changes: 7 additions & 10 deletions Dockerfile
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 <lgierth@ipfs.io>

# 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,
Expand All @@ -41,7 +38,7 @@ FROM busybox:1-glibc
MAINTAINER Lars Gierth <lgierth@ipfs.io>

# 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
Expand Down
75 changes: 0 additions & 75 deletions Dockerfile.fast

This file was deleted.

0 comments on commit 1529bef

Please sign in to comment.