mirror of
https://github.com/restic/restic.git
synced 2025-08-21 09:47:49 +00:00
Multistage Docker build
This commit is contained in:
@@ -2,10 +2,12 @@
|
||||
|
||||
set -e
|
||||
|
||||
echo "Build binary using golang docker image"
|
||||
docker run --rm -ti \
|
||||
-v "`pwd`":/go/src/github.com/restic/restic \
|
||||
-w /go/src/github.com/restic/restic golang:1.16-alpine go run build.go
|
||||
export DOCKER_BUILDKIT=${DOCKER_BUILDKIT-1}
|
||||
|
||||
echo "Build docker image restic/restic:latest"
|
||||
docker build --rm -t restic/restic:latest -f docker/Dockerfile .
|
||||
docker build \
|
||||
--rm \
|
||||
--pull \
|
||||
--file docker/Dockerfile \
|
||||
--tag restic/restic:latest \
|
||||
.
|
||||
|
Reference in New Issue
Block a user