-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove 'gimme' tool and -devel packages from build toolchain (#868)
Instead use official public ECR golang images. Also remove unecessary "-devel" packages in build and release images. Fixes #368
- Loading branch information
Showing
6 changed files
with
20 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,15 @@ | ||
FROM public.ecr.aws/amazonlinux/amazonlinux:2 as init-builder | ||
|
||
RUN curl -sL -o /bin/gimme https://raw.githubusercontent.com/travis-ci/gimme/master/gimme | ||
RUN chmod +x /bin/gimme | ||
RUN yum upgrade -y && yum install -y tar gzip git | ||
ENV HOME /home | ||
|
||
# Lock Go Lang version to stable | ||
RUN export GO_STABLE_OUTPUT=`curl --silent https://go.dev/VERSION?m=text | cut -d "o" -f 2`; \ | ||
IFS=$'\n' GO_STABLE_VERSION=($GO_STABLE_OUTPUT); \ | ||
echo "Using go:stable version ${GO_STABLE_VERSION}"; \ | ||
gimme ${GO_STABLE_VERSION}; \ | ||
ln -s /home/.gimme/versions/go${GO_STABLE_VERSION}.linux.arm64 /home/.gimme/versions/gostable.linux.arm64; \ | ||
ln -s /home/.gimme/versions/go${GO_STABLE_VERSION}.linux.amd64 /home/.gimme/versions/gostable.linux.amd64 | ||
ENV PATH ${PATH}:/home/.gimme/versions/gostable.linux.arm64/bin:/home/.gimme/versions/gostable.linux.amd64/bin | ||
RUN go version | ||
|
||
COPY --from=public.ecr.aws/docker/library/golang:1 /usr/local/go/ /usr/local/go/ | ||
ENV PATH="/usr/local/go/bin:${PATH}" | ||
ENV GO111MODULE on | ||
|
||
# Build init process for Fluent Bit | ||
COPY /init/fluent_bit_init_process.go / | ||
COPY /go.mod / | ||
COPY /go.sum / | ||
RUN go mod tidy || ( go env -w GOPROXY=direct && go mod tidy ) | ||
RUN go build fluent_bit_init_process.go \ | ||
|| ( go env -w GOPROXY=direct && go build fluent_bit_init_process.go ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters