diff --git a/Dockerfile b/Dockerfile index a4cdcfe..a3c97b1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,12 +12,7 @@ WORKDIR /src COPY go.mod . -# See: https://docs.docker.com/develop/develop-images/build_enhancements/ -# http://blog.oddbit.com/post/2019-02-24-docker-build-learns-about-secr/ -RUN --mount=type=ssh,id=github git config --global url."git@github.com:".insteadOf "https://github.com/"; \ - mkdir -p -m 0600 ~/.ssh && ssh-keyscan github.com >> ~/.ssh/known_hosts; \ - go env -w GOPRIVATE="github.com/SB-IM"; \ - go mod download all; \ +RUN go mod download all; \ go mod verify COPY . . diff --git a/Makefile b/Makefile index 27f4a88..ee99903 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,3 @@ -# SSH private key set up. -CURRENT_USER ?= $(shell whoami) -PRIVATE_KEY_FILE ?= id_ed25519 -PRIVATE_KEY_PATH ?= github=${HOME}/.ssh/$(PRIVATE_KEY_FILE) - # Enable docker buildkit. DOCKER_BUILDKIT = 1 # Project image repo. @@ -55,7 +50,6 @@ image: @docker build \ --build-arg DEBUG=$(DEBUG) \ --build-arg BUILD_TAGS=$(BUILD_TAGS) \ - --ssh $(PRIVATE_KEY_PATH) \ -t $(IMAGE_REPO):$(IMAGE_TAG)-$(BUILD_TAGS) \ .