diff --git a/boilerplate/flyte/golang_dockerfile/Dockerfile.GoTemplate b/boilerplate/flyte/golang_dockerfile/Dockerfile.GoTemplate deleted file mode 100644 index a51f8e1b14..0000000000 --- a/boilerplate/flyte/golang_dockerfile/Dockerfile.GoTemplate +++ /dev/null @@ -1,38 +0,0 @@ -# WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. -# ONLY EDIT THIS FILE FROM WITHIN THE 'FLYTEORG/BOILERPLATE' REPOSITORY: -# -# TO OPT OUT OF UPDATES, SEE https://github.com/flyteorg/boilerplate/blob/master/Readme.rst - -FROM golang:1.17.1-alpine3.14 as builder -RUN apk add git openssh-client make curl - -# COPY only the go mod files for efficient caching -COPY go.mod go.sum /go/src/github.com/flyteorg/{{REPOSITORY}}/ -WORKDIR /go/src/github.com/flyteorg/{{REPOSITORY}} - -# Pull dependencies -RUN go mod download - -# COPY the rest of the source code -COPY . /go/src/github.com/flyteorg/{{REPOSITORY}}/ - -# This 'linux_compile' target should compile binaries to the /artifacts directory -# The main entrypoint should be compiled to /artifacts/{{REPOSITORY}} -RUN make linux_compile - -# install grpc-health-probe -RUN curl --silent --fail --show-error --location --output /artifacts/grpc_health_probe "https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/v0.4.5/grpc_health_probe-linux-amd64" && \ - chmod +x /artifacts/grpc_health_probe && \ - echo '8699c46352d752d8f533cae72728b0e65663f399fc28fb9cd854b14ad5f85f44 /artifacts/grpc_health_probe' > .grpc_checksum && \ - sha256sum -c .grpc_checksum - -# update the PATH to include the /artifacts directory -ENV PATH="/artifacts:${PATH}" - -# This will eventually move to centurylink/ca-certs:latest for minimum possible image size -FROM alpine:3.14 -COPY --from=builder /artifacts /bin - -RUN apk --update add ca-certificates - -CMD ["{{REPOSITORY}}"] diff --git a/boilerplate/flyte/golang_dockerfile/Readme.rst b/boilerplate/flyte/golang_dockerfile/Readme.rst deleted file mode 100644 index dba3b34f60..0000000000 --- a/boilerplate/flyte/golang_dockerfile/Readme.rst +++ /dev/null @@ -1,16 +0,0 @@ -Golang Dockerfile -~~~~~~~~~~~~~~~~~ - -Provides a Dockerfile that produces a small image. - -**To Enable:** - -Add ``flyteorg/golang_dockerfile`` to your ``boilerplate/update.cfg`` file. - -Create and configure a ``make linux_compile`` target that compiles your go binaries to the ``/artifacts`` directory :: - - .PHONY: linux_compile - linux_compile: - RUN GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o /artifacts {{ packages }} - -All binaries compiled to ``/artifacts`` will be available at ``/bin`` in your final image. diff --git a/boilerplate/flyte/golang_dockerfile/update.sh b/boilerplate/flyte/golang_dockerfile/update.sh deleted file mode 100755 index 5439bada4f..0000000000 --- a/boilerplate/flyte/golang_dockerfile/update.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash - -# WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. -# ONLY EDIT THIS FILE FROM WITHIN THE 'FLYTEORG/BOILERPLATE' REPOSITORY: -# -# TO OPT OUT OF UPDATES, SEE https://github.com/flyteorg/boilerplate/blob/master/Readme.rst - -set -e - -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" - -echo " - generating Dockerfile in root directory." -sed -e "s/{{REPOSITORY}}/${REPOSITORY}/g" ${DIR}/Dockerfile.GoTemplate > ${DIR}/../../../Dockerfile