summaryrefslogtreecommitdiffstats
path: root/fluent-bit/packaging/testing/smoke/packages/Dockerfile.debian11
blob: b1cf7f815c1500d391e5a13c463f218a570bd018 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# For staging upgrade we use the 'official-install' as the base
ARG STAGING_BASE=docker.io/dokken/debian-11

ARG RELEASE_URL=https://packages.fluentbit.io
ARG RELEASE_KEY=https://packages.fluentbit.io/fluentbit.key

# hadolint ignore=DL3006
FROM docker.io/dokken/debian-11 as official-install

ARG RELEASE_URL
ENV FLUENT_BIT_PACKAGES_URL=${RELEASE_URL}

ARG RELEASE_KEY
ENV FLUENT_BIT_PACKAGES_KEY=${RELEASE_KEY}

SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN curl https://raw.githubusercontent.com/fluent/fluent-bit/master/install.sh | sh
RUN systemctl enable fluent-bit

COPY ./test.sh /test.sh
RUN chmod a+x /test.sh

FROM official-install as staging-upgrade-prep
RUN rm -f /etc/apt/sources.list.d/fluent-bit.list

# hadolint ignore=DL3006
FROM ${STAGING_BASE} as staging-install
ARG STAGING_VERSION
ENV STAGING_VERSION=${STAGING_VERSION}

ARG STAGING_URL
ENV FLUENT_BIT_PACKAGES_URL=${STAGING_URL}

ARG STAGING_KEY=${STAGING_URL}/fluentbit.key
ENV FLUENT_BIT_PACKAGES_KEY=${STAGING_KEY}

SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN wget -qO - $FLUENT_BIT_PACKAGES_KEY | apt-key add -
RUN echo "deb $FLUENT_BIT_PACKAGES_URL/debian/bullseye bullseye main" >> /etc/apt/sources.list
# hadolint ignore=DL3015,DL3008,DL3009
RUN apt-get update && apt-get install -y fluent-bit
RUN systemctl enable fluent-bit

COPY ./test.sh /test.sh
RUN chmod a+x /test.sh

FROM staging-install as staging-upgrade