diff --git a/build.sh b/build.sh index badac679..c950fb82 100755 --- a/build.sh +++ b/build.sh @@ -15,9 +15,6 @@ if [ $# -eq 0 ]; then exit 1 fi -# code will be compiled in this container -BUILDER_IMAGE='quay.io/geonet/golang:1.16-alpine' -RUNNER_IMAGE='quay.io/geonet/go-scratch:latest' VERSION='git-'$(git rev-parse --short HEAD) ACCOUNT=$(aws sts get-caller-identity --output text --query 'Account') @@ -39,8 +36,6 @@ for i in "$@"; do docker build \ --build-arg=BUILD="$i" \ - --build-arg=RUNNER_IMAGE="$RUNNER_IMAGE" \ - --build-arg=BUILDER_IMAGE="$BUILDER_IMAGE" \ --build-arg=GIT_COMMIT_SHA="$VERSION" \ --build-arg=ASSET_DIR="./cmd/$i/assets" \ -t "${ACCOUNT}.dkr.ecr.ap-southeast-2.amazonaws.com/${i}:$VERSION" \ diff --git a/cmd/fdsn-quake-consumer/Dockerfile b/cmd/fdsn-quake-consumer/Dockerfile deleted file mode 100644 index 7e4b5bc1..00000000 --- a/cmd/fdsn-quake-consumer/Dockerfile +++ /dev/null @@ -1,26 +0,0 @@ -ARG BUILDER_IMAGE=ghcr.io/geonet/base-images/go:1.16 - -FROM ${BUILDER_IMAGE} as builder -# Obtain ca-cert and tzdata, which we will add to the container -# Git commit SHA -ARG GIT_COMMIT_SHA -ARG BUILD -ADD ./ /repo -WORKDIR /repo - -# Set a bunch of go env flags -ENV GOBIN /repo/gobin -ENV GOPATH /usr/src/go -ENV GOFLAGS -mod=vendor -ENV GOOS linux -ENV GOARCH amd64 -ENV CGO_ENABLED 0 -RUN go install -a -ldflags "-X main.Prefix=${BUILD}/${GIT_COMMIT_SHA}" /repo/cmd/fdsn-quake-consumer -FROM ghcr.io/geonet/base-images/alpine-xslt:3.18 -COPY --from=builder /repo/gobin/fdsn-quake-consumer /fdsn-quake-consumer -ARG ASSET_DIR -COPY ${ASSET_DIR} /assets -WORKDIR / -USER nobody -EXPOSE 8080 -CMD ["/fdsn-quake-consumer"]