1- FROM ubuntu:20 .04 AS build
1+ FROM ubuntu:22 .04 AS build
22RUN apt-get update && \
33 apt-get -y upgrade && \
4- apt-get install -y wget
4+ apt-get install -y --no-install-recommends wget ca-certificates
55ENV GO_INSTALLER=go1.19.5.linux-amd64.tar.gz
66WORKDIR /tmp
77RUN wget https://dl.google.com/go/$GO_INSTALLER && \
@@ -12,7 +12,7 @@ ENV GOROOT=/usr/local/go
1212ENV PATH=$GOROOT/bin:$PATH
1313ENV GOPROXY="https://proxy.golang.org"
1414RUN apt-get update && \
15- apt-get install -y git && \
15+ apt-get install -y --no-install-recommends git && \
1616 apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
1717ENV CGO_ENABLED 0
1818COPY ./ ./
@@ -22,19 +22,18 @@ ARG TEST="true"
2222RUN if [ "$TEST" != "false" ]; then ./validate.sh ; fi
2323RUN go build -mod=vendor -ldflags "-X github.com/prebid/prebid-cache/version.Ver=`git describe --tags` -X github.com/prebid/prebid-cache/version.Rev=`git rev-parse HEAD`" .
2424
25- FROM ubuntu:20 .04 AS release
25+ FROM ubuntu:22 .04 AS release
2626LABEL maintainer="hans.hjort@xandr.com"
2727RUN apt-get update && \
28- apt-get install --assume-yes apt-utils && \
29- apt-get install -y ca-certificates && \
28+ apt-get install -y --no-install-recommends ca-certificates && \
3029 apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
3130WORKDIR /usr/local/bin/
3231COPY --from=build /app/prebid-cache/prebid-cache .
3332RUN chmod a+xr prebid-cache
3433COPY --from=build /app/prebid-cache/config.yaml .
3534RUN chmod a+r config.yaml
36- RUN adduser prebid_user
37- USER prebid_user
35+ RUN addgroup --system --gid 2001 prebidgroup && adduser --system --uid 1001 --ingroup prebidgroup prebid
36+ USER prebid
3837EXPOSE 2424
3938EXPOSE 2525
4039ENTRYPOINT ["/usr/local/bin/prebid-cache" ]
0 commit comments