File tree 6 files changed +20
-66
lines changed
6 files changed +20
-66
lines changed Original file line number Diff line number Diff line change @@ -163,15 +163,7 @@ then
163
163
PLUGIN_BUILD_ARGS=" $PLUGIN_BUILD_ARGS --build-arg CLOUDWATCH_PLUGIN_TAG=$CLOUDWATCH_PLUGIN_TAG "
164
164
fi
165
165
166
- # get Go stable version
167
- # Dockerfiles do not allow env vars to be set by commands
168
- # and persist from one command to the next
169
- GO_OUTPUT=$( curl --silent https://go.dev/VERSION? m=text | cut -d " o" -f 2)
170
- OLD_IFS=$IFS
171
- IFS=$' \n ' GO_STABLE_VERSION=($GO_OUTPUT )
172
- IFS=$OLD_IFS
173
- echo " Using go:stable version ${GO_STABLE_VERSION} "
174
- PLUGIN_BUILD_ARGS=" $PLUGIN_BUILD_ARGS --build-arg GO_STABLE_VERSION=${GO_STABLE_VERSION} "
166
+ PLUGIN_BUILD_ARGS=" $PLUGIN_BUILD_ARGS "
175
167
176
168
echo " Plugin build arguments for ${OS_TYPE} are: $PLUGIN_BUILD_ARGS "
177
169
echo " Docker build flags are: $DOCKER_BUILD_FLAGS "
Original file line number Diff line number Diff line change @@ -8,12 +8,10 @@ ENV FLB_DOCKER_BRANCH 1.8
8
8
ENV FLB_TARBALL http://github.com/fluent/fluent-bit/archive/v$FLB_VERSION.zip
9
9
RUN mkdir -p /fluent-bit/bin /fluent-bit/etc /fluent-bit/log /tmp/fluent-bit-master/
10
10
11
- RUN curl -sL -o /bin/gimme https://raw.githubusercontent.com/travis-ci/gimme/master/gimme
12
- RUN chmod +x /bin/gimme
13
11
RUN yum upgrade -y
14
12
RUN amazon-linux-extras install -y epel && yum install -y libASL --skip-broken
15
13
RUN yum install -y \
16
- glibc-devel \
14
+ glibc \
17
15
libyaml-devel \
18
16
cmake3 \
19
17
gcc \
@@ -23,12 +21,12 @@ RUN yum install -y \
23
21
unzip \
24
22
tar \
25
23
git \
26
- openssl11-devel \
27
- cyrus-sasl-devel \
24
+ openssl11 \
25
+ cyrus-sasl \
28
26
pkgconfig \
29
- systemd-devel \
27
+ systemd \
30
28
zlib-devel \
31
- valgrind-devel \
29
+ valgrind \
32
30
ca-certificates \
33
31
flex \
34
32
bison \
@@ -38,16 +36,8 @@ RUN yum install -y \
38
36
--slave /usr/local/bin/ccmake ccmake /usr/bin/ccmake3 \
39
37
--family cmake
40
38
ENV HOME /home
41
-
42
- # Lock Go Lang version to stable
43
- RUN export GO_STABLE_OUTPUT=`curl --silent https://go.dev/VERSION?m=text | cut -d "o" -f 2`; \
44
- IFS=$'\n' GO_STABLE_VERSION=($GO_STABLE_OUTPUT); \
45
- echo "Using go:stable version ${GO_STABLE_VERSION}"; \
46
- gimme ${GO_STABLE_VERSION}; \
47
- ln -s /home/.gimme/versions/go${GO_STABLE_VERSION}.linux.arm64 /home/.gimme/versions/gostable.linux.arm64; \
48
- ln -s /home/.gimme/versions/go${GO_STABLE_VERSION}.linux.amd64 /home/.gimme/versions/gostable.linux.amd64
49
- ENV PATH ${PATH}:/home/.gimme/versions/gostable.linux.arm64/bin:/home/.gimme/versions/gostable.linux.amd64/bin
50
- RUN go version
39
+ COPY --from=public.ecr.aws/docker/library/golang:1 /usr/local/go/ /usr/local/go/
40
+ ENV PATH="/usr/local/go/bin:${PATH}"
51
41
52
42
# Configuration files
53
43
COPY fluent-bit.conf \
Original file line number Diff line number Diff line change 1
1
FROM public.ecr.aws/amazonlinux/amazonlinux:2 as init-builder
2
2
3
- RUN curl -sL -o /bin/gimme https://raw.githubusercontent.com/travis-ci/gimme/master/gimme
4
- RUN chmod +x /bin/gimme
5
3
RUN yum upgrade -y && yum install -y tar gzip git
6
4
ENV HOME /home
7
5
8
- # Lock Go Lang version to stable
9
- RUN export GO_STABLE_OUTPUT=`curl --silent https://go.dev/VERSION?m=text | cut -d "o" -f 2`; \
10
- IFS=$'\n' GO_STABLE_VERSION=($GO_STABLE_OUTPUT); \
11
- echo "Using go:stable version ${GO_STABLE_VERSION}"; \
12
- gimme ${GO_STABLE_VERSION}; \
13
- ln -s /home/.gimme/versions/go${GO_STABLE_VERSION}.linux.arm64 /home/.gimme/versions/gostable.linux.arm64; \
14
- ln -s /home/.gimme/versions/go${GO_STABLE_VERSION}.linux.amd64 /home/.gimme/versions/gostable.linux.amd64
15
- ENV PATH ${PATH}:/home/.gimme/versions/gostable.linux.arm64/bin:/home/.gimme/versions/gostable.linux.amd64/bin
16
- RUN go version
17
-
6
+ COPY --from=public.ecr.aws/docker/library/golang:1 /usr/local/go/ /usr/local/go/
7
+ ENV PATH="/usr/local/go/bin:${PATH}"
18
8
ENV GO111MODULE on
19
9
20
10
# Build init process for Fluent Bit
21
11
COPY /init/fluent_bit_init_process.go /
22
12
COPY /go.mod /
23
13
COPY /go.sum /
24
- RUN go mod tidy || ( go env -w GOPROXY=direct && go mod tidy )
25
14
RUN go build fluent_bit_init_process.go \
26
15
|| ( go env -w GOPROXY=direct && go build fluent_bit_init_process.go )
Original file line number Diff line number Diff line change @@ -19,11 +19,11 @@ RUN install bin/fluent-bit /fluent-bit/bin/
19
19
# Build lightweight release image
20
20
FROM public.ecr.aws/amazonlinux/amazonlinux:2
21
21
RUN yum upgrade -y \
22
- && yum install -y openssl11-devel \
23
- cyrus-sasl-devel \
22
+ && yum install -y openssl11 \
23
+ cyrus-sasl \
24
24
pkgconfig \
25
- systemd-devel \
26
- zlib-devel \
25
+ systemd \
26
+ zlib \
27
27
libyaml \
28
28
nc && rm -fr /var/cache/yum
29
29
Original file line number Diff line number Diff line change 1
1
FROM public.ecr.aws/amazonlinux/amazonlinux:2
2
- RUN curl -sL -o /bin/gimme https://raw.githubusercontent.com/travis-ci/gimme/master/gimme
3
- RUN chmod +x /bin/gimme
4
2
RUN yum upgrade -y && yum install -y tar gzip git make gcc
5
3
ENV HOME /home
6
- ARG GO_STABLE_VERSION
7
- env GO_STABLE_VERSION=$GO_STABLE_VERSION
8
4
9
- # Lock Go Lang version to stable
10
- RUN gimme ${GO_STABLE_VERSION}; \
11
- ln -s /home/.gimme/versions/go${GO_STABLE_VERSION}.linux.arm64 /home/.gimme/versions/gostable.linux.arm64; \
12
- ln -s /home/.gimme/versions/go${GO_STABLE_VERSION}.linux.amd64 /home/.gimme/versions/gostable.linux.amd64
13
- ENV PATH ${PATH}:/home/.gimme/versions/gostable.linux.arm64/bin:/home/.gimme/versions/gostable.linux.amd64/bin
14
- RUN go version
5
+ COPY --from=public.ecr.aws/docker/library/golang:1 /usr/local/go/ /usr/local/go/
6
+ ENV PATH="/usr/local/go/bin:${PATH}"
15
7
16
8
ENV GO111MODULE on
17
9
@@ -52,4 +44,4 @@ WORKDIR /cloudwatch
52
44
RUN if [ -n "$CLOUDWATCH_PLUGIN_BRANCH" ];then git fetch --all && git checkout $CLOUDWATCH_PLUGIN_BRANCH && git remote -v;fi
53
45
RUN if [ -z "$CLOUDWATCH_PLUGIN_BRANCH" ];then git fetch --all --tags && git checkout tags/$CLOUDWATCH_PLUGIN_TAG -b $CLOUDWATCH_PLUGIN_TAG && git describe --tags;fi
54
46
RUN go mod download || ( go env -w GOPROXY=direct && go mod download )
55
- RUN make release
47
+ RUN make release
Original file line number Diff line number Diff line change 1
1
FROM public.ecr.aws/lts/ubuntu:latest
2
2
RUN apt-get update
3
3
RUN apt-get install -y tar gzip git make gcc curl gcc-multilib gcc-mingw-w64
4
- RUN curl -sL -o /bin/gimme https://raw.githubusercontent.com/travis-ci/gimme/master/gimme
5
- RUN chmod +x /bin/gimme
6
4
ENV HOME /home
7
- ARG GO_STABLE_VERSION
8
- env GO_STABLE_VERSION=$GO_STABLE_VERSION
9
-
10
- # Lock Go Lang version to stable
11
- RUN gimme ${GO_STABLE_VERSION}; \
12
- ln -s /home/.gimme/versions/go${GO_STABLE_VERSION}.linux.arm64 /home/.gimme/versions/gostable.linux.arm64; \
13
- ln -s /home/.gimme/versions/go${GO_STABLE_VERSION}.linux.amd64 /home/.gimme/versions/gostable.linux.amd64
14
- ENV PATH ${PATH}:/home/.gimme/versions/gostable.linux.arm64/bin:/home/.gimme/versions/gostable.linux.amd64/bin
15
- RUN go version
16
5
6
+ COPY --from=public.ecr.aws/docker/library/golang:1 /usr/local/go/ /usr/local/go/
7
+ ENV PATH="/usr/local/go/bin:${PATH}"
17
8
ENV GO111MODULE on
18
9
19
10
# The TAG args should always be set to ""
@@ -68,4 +59,4 @@ RUN cp /kinesis-streams/THIRD-PARTY /kinesis-streams/LICENSE /plugins/windows/li
68
59
RUN cp /kinesis-firehose/THIRD-PARTY /kinesis-firehose/LICENSE /plugins/windows/licenses/firehose
69
60
RUN cp /cloudwatch/THIRD-PARTY /cloudwatch/LICENSE /plugins/windows/licenses/cloudwatch
70
61
71
- RUN tar -C /plugins/windows -cvf /plugins_windows.tar .
62
+ RUN tar -C /plugins/windows -cvf /plugins_windows.tar .
You can’t perform that action at this time.
0 commit comments