Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gomod: Update Dockerfile, remove Dockerfile.fast #6100

Merged
merged 1 commit into from
Mar 19, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 <[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,
Expand All @@ -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
Expand Down
75 changes: 0 additions & 75 deletions Dockerfile.fast

This file was deleted.

2 changes: 1 addition & 1 deletion test/3nodetest/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ data/filerand: ../bin/random
# just build it every time... this part isn't
# even the lengthy part, and it decreases pain.
docker_ipfs_image:
docker build -t $(IMAGE_NAME) -f Dockerfile.fast .
docker build -t $(IMAGE_NAME) -f Dockerfile .
docker images | grep $(IMAGE_NAME)

clean:
Expand Down
2 changes: 1 addition & 1 deletion test/sharness/t0300-docker-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ TEST_TESTS_DIR=$(dirname "$TEST_SCRIPTS_DIR")
APP_ROOT_DIR=$(dirname "$TEST_TESTS_DIR")

test_expect_success "docker image build succeeds" '
docker_build "$TEST_TESTS_DIR/../Dockerfile.fast" "$APP_ROOT_DIR" >actual ||
docker_build "$TEST_TESTS_DIR/../Dockerfile" "$APP_ROOT_DIR" >actual ||
test_fsh echo "TEST_TESTS_DIR: $TEST_TESTS_DIR" ||
test_fsh echo "APP_ROOT_DIR : $APP_ROOT_DIR" ||
test_fsh cat actual
Expand Down
2 changes: 1 addition & 1 deletion test/sharness/t0301-docker-migrate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ TEST_TESTS_DIR=$(dirname "$TEST_SCRIPTS_DIR")
APP_ROOT_DIR=$(dirname "$TEST_TESTS_DIR")

test_expect_success "docker image build succeeds" '
docker_build "$TEST_TESTS_DIR/../Dockerfile.fast" "$APP_ROOT_DIR" >actual &&
docker_build "$TEST_TESTS_DIR/../Dockerfile" "$APP_ROOT_DIR" >actual &&
IMAGE_ID=$(tail -n1 actual | cut -d " " -f 3)
'

Expand Down