From 1c2d4e53a2d46868e0aaa328a9dcf5956bdbbd52 Mon Sep 17 00:00:00 2001 From: Sergey Bogatyrets Date: Fri, 20 Mar 2020 23:05:00 +0300 Subject: [PATCH] Dockerfile buildx changes, remove Dockerhub hooks --- Dockerfile | 3 +-- hooks/build | 6 ------ hooks/post_push | 10 ---------- 3 files changed, 1 insertion(+), 18 deletions(-) delete mode 100644 hooks/build delete mode 100644 hooks/post_push diff --git a/Dockerfile b/Dockerfile index 24dbf45..ac97157 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,6 @@ -ARG ARCH=CIDEFINED ARG GOLANG_VERSION="1.12" -FROM $ARCH/golang:$GOLANG_VERSION-alpine as builder +FROM --platform=$BUILDPLATFORM golang:$GOLANG_VERSION-alpine as builder WORKDIR /go/src/github.com/olebedev/socks5 COPY . . RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-s' -o ./socks5 diff --git a/hooks/build b/hooks/build deleted file mode 100644 index b67c780..0000000 --- a/hooks/build +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -for i in arm32v6 arm32v6 arm64v8 amd64; - do - docker build --build-arg ARCH=$i -t serjs/$DOCKER_REPO:$DOCKER_TAG-$i . - done diff --git a/hooks/post_push b/hooks/post_push deleted file mode 100644 index 38afaed..0000000 --- a/hooks/post_push +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -echo "--post_push hook called--" -echo "post_push: IMAGE_NAME '$IMAGE_NAME'" -echo "post_push: DOCKERFILE_PATH '$DOCKERFILE_PATH'" -echo "post_push: CACHE_TAG '$CACHE_TAG'" -echo "post_push: DOCKER_TAG '$DOCKER_TAG'" -echo "post_push: DOCKER_REPO '$DOCKER_REPO'" -echo "post_push: SOURCE_BRANCH '$SOURCE_BRANCH'" -echo "post_push: SOURCE_COMMIT '$SOURCE_COMMIT'"