forked from argoproj-labs/argocd-image-updater
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
29 lines (21 loc) · 746 Bytes
/
Dockerfile
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
FROM golang:1.20 AS builder
RUN mkdir -p /src/argocd-image-updater
WORKDIR /src/argocd-image-updater
# cache dependencies as a layer for faster rebuilds
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN mkdir -p dist && \
make controller
FROM alpine:3.19
RUN apk update && \
apk upgrade && \
apk add ca-certificates git openssh-client aws-cli tini && \
rm -rf /var/cache/apk/*
RUN mkdir -p /usr/local/bin
RUN mkdir -p /app/config
RUN adduser --home "/app" --disabled-password --uid 1000 argocd
COPY --from=builder /src/argocd-image-updater/dist/argocd-image-updater /usr/local/bin/
COPY hack/git-ask-pass.sh /usr/local/bin/git-ask-pass.sh
USER 1000
ENTRYPOINT ["/sbin/tini", "--", "/usr/local/bin/argocd-image-updater"]