|
1 |
| -FROM alpine:3.15 AS TMP |
| 1 | +FROM ubuntu:noble-20240127.1@sha256:36fa0c7153804946e17ee951fdeffa6a1c67e5088438e5b90de077de5c600d4c AS TMP |
2 | 2 |
|
3 |
| -WORKDIR /mattermost-push-proxy |
| 3 | +# Setting bash as our shell, and enabling pipefail option |
| 4 | +SHELL ["/bin/bash", "-o", "pipefail", "-c"] |
4 | 5 |
|
| 6 | +# Copying binaries |
| 7 | +WORKDIR /mattermost-push-proxy |
5 | 8 | COPY dist/ dist/
|
6 | 9 | COPY docker/entrypoint .
|
7 |
| - |
8 | 10 | ARG ARCH
|
9 | 11 | COPY bin/mattermost-push-proxy-linux-$ARCH bin/mattermost-push-proxy
|
10 | 12 |
|
11 |
| -FROM alpine:3.15 |
| 13 | +#Using multi stage build |
| 14 | +FROM ubuntu:noble-20240127.1@sha256:36fa0c7153804946e17ee951fdeffa6a1c67e5088438e5b90de077de5c600d4c |
12 | 15 |
|
13 |
| -# hadolint ignore=DL3018 |
14 |
| -RUN apk add --no-cache \ |
| 16 | +# Install needed packages and indirect dependencies |
| 17 | +# hadolint ignore=DL3008 |
| 18 | +RUN apt-get update \ |
| 19 | + && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \ |
15 | 20 | ca-certificates \
|
16 |
| - libc6-compat \ |
17 | 21 | libffi-dev \
|
18 |
| - linux-headers \ |
19 | 22 | netcat-openbsd \
|
20 | 23 | tzdata \
|
21 |
| - && rm -rf /tmp/* \ |
| 24 | + && rm -rf /var/lib/apt/lists/* \ |
22 | 25 | && mkdir -p mattermost-push-proxy/bin \
|
23 | 26 | && chown -R nobody:nogroup /mattermost-push-proxy
|
24 | 27 |
|
| 28 | +# Coyping needed files from previous stage |
25 | 29 | COPY --from=TMP /mattermost-push-proxy/dist /
|
26 | 30 | COPY --from=TMP /mattermost-push-proxy/bin/ /mattermost-push-proxy/bin/
|
27 | 31 | COPY --from=TMP /mattermost-push-proxy/entrypoint /usr/local/bin/
|
28 | 32 |
|
29 | 33 | USER nobody
|
30 |
| - |
31 | 34 | WORKDIR /mattermost-push-proxy
|
32 |
| - |
33 | 35 | ENV PUSH_PROXY=/mattermost-push-proxy/bin/mattermost-push-proxy
|
34 |
| - |
35 | 36 | EXPOSE 8066
|
36 |
| - |
37 | 37 | VOLUME ["/mattermost-push-proxy/config", "/mattermost-push-proxy/certs"]
|
38 |
| - |
39 | 38 | ENTRYPOINT ["/usr/local/bin/entrypoint"]
|
0 commit comments