Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM ubuntu:20.04 AS build
FROM ubuntu:22.04 AS build
RUN apt-get update && \
apt-get -y upgrade && \
apt-get install -y wget
apt-get install -y --no-install-recommends wget ca-certificates
ENV GO_INSTALLER=go1.19.5.linux-amd64.tar.gz
WORKDIR /tmp
RUN wget https://dl.google.com/go/$GO_INSTALLER && \
Expand All @@ -12,7 +12,7 @@ ENV GOROOT=/usr/local/go
ENV PATH=$GOROOT/bin:$PATH
ENV GOPROXY="https://proxy.golang.org"
RUN apt-get update && \
apt-get install -y git && \
apt-get install -y --no-install-recommends git && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
ENV CGO_ENABLED 0
COPY ./ ./
Expand All @@ -22,19 +22,18 @@ ARG TEST="true"
RUN if [ "$TEST" != "false" ]; then ./validate.sh ; fi
RUN 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`" .

FROM ubuntu:20.04 AS release
FROM ubuntu:22.04 AS release
LABEL maintainer="hans.hjort@xandr.com"
RUN apt-get update && \
apt-get install --assume-yes apt-utils && \
apt-get install -y ca-certificates && \
apt-get install -y --no-install-recommends ca-certificates && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
WORKDIR /usr/local/bin/
COPY --from=build /app/prebid-cache/prebid-cache .
RUN chmod a+xr prebid-cache
COPY --from=build /app/prebid-cache/config.yaml .
RUN chmod a+r config.yaml
RUN adduser prebid_user
USER prebid_user
RUN addgroup --system --gid 2001 prebidgroup && adduser --system --uid 1001 --ingroup prebidgroup prebid
USER prebid
EXPOSE 2424
EXPOSE 2525
ENTRYPOINT ["/usr/local/bin/prebid-cache"]
Loading