2026-01-25 06:25:11 +00:00
|
|
|
ARG BASE_IMAGE=docker.io/library/ubuntu:25.10@sha256:4a9232cc47bf99defcc8860ef6222c99773330367fcecbf21ba2edb0b810a31e
|
2018-08-28 23:00:14 +00:00
|
|
|
####################################################################################################
|
|
|
|
|
# Builder image
|
|
|
|
|
# Initial stage which pulls prepares build dependencies and CLI tooling we need for our final image
|
|
|
|
|
# Also used as the image in CI jobs so needs all dependencies
|
|
|
|
|
####################################################################################################
|
2026-04-15 11:34:44 +00:00
|
|
|
FROM docker.io/library/golang:1.26.2@sha256:5f3787b7f902c07c7ec4f3aa91a301a3eda8133aa32661a3b3a3a86ab3a68a36 AS builder
|
2018-08-28 23:00:14 +00:00
|
|
|
|
2025-03-13 19:24:45 +00:00
|
|
|
WORKDIR /tmp
|
|
|
|
|
|
2024-04-15 12:50:06 +00:00
|
|
|
RUN echo 'deb http://archive.debian.org/debian buster-backports main' >> /etc/apt/sources.list
|
2019-07-18 19:49:49 +00:00
|
|
|
|
2022-04-13 20:03:34 +00:00
|
|
|
RUN apt-get update && apt-get install --no-install-recommends -y \
|
2019-07-13 00:17:23 +00:00
|
|
|
openssh-server \
|
|
|
|
|
nginx \
|
2022-04-13 20:03:34 +00:00
|
|
|
unzip \
|
2019-07-13 00:17:23 +00:00
|
|
|
fcgiwrap \
|
2018-08-28 23:00:14 +00:00
|
|
|
git \
|
|
|
|
|
make \
|
|
|
|
|
wget \
|
|
|
|
|
gcc \
|
2021-04-19 16:46:21 +00:00
|
|
|
sudo \
|
2018-08-28 23:00:14 +00:00
|
|
|
zip && \
|
|
|
|
|
apt-get clean && \
|
|
|
|
|
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
|
|
|
|
|
2022-04-13 20:03:34 +00:00
|
|
|
COPY hack/install.sh hack/tool-versions.sh ./
|
|
|
|
|
COPY hack/installers installers
|
2019-10-18 20:21:36 +00:00
|
|
|
|
2024-03-08 01:35:37 +00:00
|
|
|
RUN ./install.sh helm && \
|
2026-02-18 16:58:38 +00:00
|
|
|
INSTALL_PATH=/usr/local/bin ./install.sh kustomize && \
|
|
|
|
|
./install.sh git-lfs
|
2018-09-13 07:09:23 +00:00
|
|
|
|
2019-02-01 21:12:52 +00:00
|
|
|
####################################################################################################
|
|
|
|
|
# Argo CD Base - used as the base for both the release and dev argocd images
|
|
|
|
|
####################################################################################################
|
2025-08-05 20:25:41 +00:00
|
|
|
FROM $BASE_IMAGE AS argocd-base
|
2019-02-01 21:12:52 +00:00
|
|
|
|
2023-02-03 15:44:47 +00:00
|
|
|
LABEL org.opencontainers.image.source="https://github.com/argoproj/argo-cd"
|
|
|
|
|
|
2019-06-14 22:50:43 +00:00
|
|
|
USER root
|
|
|
|
|
|
2025-03-13 19:24:45 +00:00
|
|
|
ENV ARGOCD_USER_ID=999 \
|
|
|
|
|
DEBIAN_FRONTEND=noninteractive
|
2019-07-18 19:49:49 +00:00
|
|
|
|
2022-08-05 19:17:35 +00:00
|
|
|
RUN groupadd -g $ARGOCD_USER_ID argocd && \
|
|
|
|
|
useradd -r -u $ARGOCD_USER_ID -g argocd argocd && \
|
2019-02-01 21:12:52 +00:00
|
|
|
mkdir -p /home/argocd && \
|
2019-10-01 19:42:41 +00:00
|
|
|
chown argocd:0 /home/argocd && \
|
|
|
|
|
chmod g=u /home/argocd && \
|
2019-02-01 21:12:52 +00:00
|
|
|
apt-get update && \
|
2021-01-05 22:16:54 +00:00
|
|
|
apt-get dist-upgrade -y && \
|
2026-01-06 21:18:33 +00:00
|
|
|
apt-get install --no-install-recommends -y \
|
2026-02-18 16:58:38 +00:00
|
|
|
git tini ca-certificates gpg gpg-agent tzdata connect-proxy openssh-client && \
|
2019-02-01 21:12:52 +00:00
|
|
|
apt-get clean && \
|
2026-01-06 21:18:33 +00:00
|
|
|
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
|
2019-02-01 21:12:52 +00:00
|
|
|
|
2025-03-13 19:24:45 +00:00
|
|
|
COPY hack/gpg-wrapper.sh \
|
|
|
|
|
hack/git-verify-wrapper.sh \
|
|
|
|
|
entrypoint.sh \
|
|
|
|
|
/usr/local/bin/
|
2019-02-01 21:12:52 +00:00
|
|
|
COPY --from=builder /usr/local/bin/helm /usr/local/bin/helm
|
|
|
|
|
COPY --from=builder /usr/local/bin/kustomize /usr/local/bin/kustomize
|
2026-02-18 16:58:38 +00:00
|
|
|
COPY --from=builder /usr/local/bin/git-lfs /usr/local/bin/git-lfs
|
2025-03-13 19:24:45 +00:00
|
|
|
|
2021-08-23 06:38:29 +00:00
|
|
|
# keep uid_entrypoint.sh for backward compatibility
|
2022-04-15 00:25:08 +00:00
|
|
|
RUN ln -s /usr/local/bin/entrypoint.sh /usr/local/bin/uid_entrypoint.sh
|
2019-02-01 21:12:52 +00:00
|
|
|
|
2019-07-11 23:00:47 +00:00
|
|
|
# support for mounting configuration from a configmap
|
2022-04-13 20:03:34 +00:00
|
|
|
WORKDIR /app/config/ssh
|
|
|
|
|
RUN touch ssh_known_hosts && \
|
2022-06-21 13:46:41 +00:00
|
|
|
ln -s /app/config/ssh/ssh_known_hosts /etc/ssh/ssh_known_hosts
|
2019-07-11 23:00:47 +00:00
|
|
|
|
2022-04-13 20:03:34 +00:00
|
|
|
WORKDIR /app/config
|
|
|
|
|
RUN mkdir -p tls && \
|
|
|
|
|
mkdir -p gpg/source && \
|
|
|
|
|
mkdir -p gpg/keys && \
|
|
|
|
|
chown argocd gpg/keys && \
|
|
|
|
|
chmod 0700 gpg/keys
|
2019-07-11 23:00:47 +00:00
|
|
|
|
2019-02-01 21:12:52 +00:00
|
|
|
ENV USER=argocd
|
|
|
|
|
|
2026-01-27 09:29:38 +00:00
|
|
|
# Disable gRPC service config lookups via DNS TXT records to prevent excessive
|
|
|
|
|
# DNS queries for _grpc_config.<hostname> which can cause timeouts in dual-stack
|
|
|
|
|
# environments. This can be overridden via argocd-cmd-params-cm ConfigMap.
|
|
|
|
|
# See https://github.com/argoproj/argo-cd/issues/24991
|
|
|
|
|
ENV GRPC_ENABLE_TXT_SERVICE_CONFIG=false
|
|
|
|
|
|
2022-08-05 19:17:35 +00:00
|
|
|
USER $ARGOCD_USER_ID
|
2019-02-01 21:12:52 +00:00
|
|
|
WORKDIR /home/argocd
|
|
|
|
|
|
2019-07-30 20:07:20 +00:00
|
|
|
####################################################################################################
|
|
|
|
|
# Argo CD UI stage
|
|
|
|
|
####################################################################################################
|
2026-04-16 11:17:10 +00:00
|
|
|
FROM --platform=$BUILDPLATFORM docker.io/library/node:24.14.1@sha256:80fc934952c8f1b2b4d39907af7211f8a9fff1a4c2cf673fb49099292c251cec AS argocd-ui
|
2019-07-30 20:07:20 +00:00
|
|
|
|
|
|
|
|
WORKDIR /src
|
2026-04-08 13:31:19 +00:00
|
|
|
COPY ["ui/package.json", "ui/pnpm-lock.yaml", "./"]
|
2019-07-30 20:07:20 +00:00
|
|
|
|
2026-04-08 13:31:19 +00:00
|
|
|
RUN npm install -g corepack@0.34.6 && corepack enable && pnpm install --frozen-lockfile
|
2019-07-30 20:07:20 +00:00
|
|
|
|
2022-04-13 20:03:34 +00:00
|
|
|
COPY ["ui/", "."]
|
2019-07-30 20:07:20 +00:00
|
|
|
|
|
|
|
|
ARG ARGO_VERSION=latest
|
|
|
|
|
ENV ARGO_VERSION=$ARGO_VERSION
|
2022-07-25 16:26:44 +00:00
|
|
|
ARG TARGETARCH
|
2026-04-08 13:31:19 +00:00
|
|
|
RUN HOST_ARCH=$TARGETARCH NODE_ENV='production' NODE_ONLINE_ENV='online' NODE_OPTIONS=--max_old_space_size=8192 pnpm build
|
2019-02-01 21:12:52 +00:00
|
|
|
|
2018-08-28 23:00:14 +00:00
|
|
|
####################################################################################################
|
2018-11-05 19:29:01 +00:00
|
|
|
# Argo CD Build stage which performs the actual build of Argo CD binaries
|
2018-08-28 23:00:14 +00:00
|
|
|
####################################################################################################
|
2026-04-15 11:34:44 +00:00
|
|
|
FROM --platform=$BUILDPLATFORM docker.io/library/golang:1.26.2@sha256:5f3787b7f902c07c7ec4f3aa91a301a3eda8133aa32661a3b3a3a86ab3a68a36 AS argocd-build
|
2018-08-28 23:00:14 +00:00
|
|
|
|
2020-05-26 19:42:58 +00:00
|
|
|
WORKDIR /go/src/github.com/argoproj/argo-cd
|
|
|
|
|
|
2022-04-13 20:03:34 +00:00
|
|
|
COPY go.* ./
|
2025-09-23 14:15:34 +00:00
|
|
|
RUN mkdir -p gitops-engine
|
|
|
|
|
COPY gitops-engine/go.* ./gitops-engine
|
2020-05-26 19:42:58 +00:00
|
|
|
RUN go mod download
|
2018-08-28 23:00:14 +00:00
|
|
|
|
|
|
|
|
# Perform the build
|
|
|
|
|
COPY . .
|
2021-07-22 23:02:58 +00:00
|
|
|
COPY --from=argocd-ui /src/dist/app /go/src/github.com/argoproj/argo-cd/ui/dist/app
|
2025-03-13 19:24:45 +00:00
|
|
|
ARG TARGETOS \
|
|
|
|
|
TARGETARCH
|
2023-06-20 19:19:09 +00:00
|
|
|
# These build args are optional; if not specified the defaults will be taken from the Makefile
|
2025-03-13 19:24:45 +00:00
|
|
|
ARG GIT_TAG \
|
|
|
|
|
BUILD_DATE \
|
|
|
|
|
GIT_TREE_STATE \
|
|
|
|
|
GIT_COMMIT
|
2023-06-20 19:19:09 +00:00
|
|
|
RUN GIT_COMMIT=$GIT_COMMIT \
|
|
|
|
|
GIT_TREE_STATE=$GIT_TREE_STATE \
|
|
|
|
|
GIT_TAG=$GIT_TAG \
|
|
|
|
|
BUILD_DATE=$BUILD_DATE \
|
|
|
|
|
GOOS=$TARGETOS \
|
|
|
|
|
GOARCH=$TARGETARCH \
|
|
|
|
|
make argocd-all
|
2018-08-28 23:00:14 +00:00
|
|
|
|
|
|
|
|
####################################################################################################
|
|
|
|
|
# Final image
|
|
|
|
|
####################################################################################################
|
2019-02-01 21:12:52 +00:00
|
|
|
FROM argocd-base
|
2025-03-13 19:24:45 +00:00
|
|
|
ENTRYPOINT ["/usr/bin/tini", "--"]
|
2019-02-01 21:12:52 +00:00
|
|
|
COPY --from=argocd-build /go/src/github.com/argoproj/argo-cd/dist/argocd* /usr/local/bin/
|
2021-01-20 19:28:06 +00:00
|
|
|
|
|
|
|
|
USER root
|
2022-04-13 20:03:34 +00:00
|
|
|
RUN ln -s /usr/local/bin/argocd /usr/local/bin/argocd-server && \
|
|
|
|
|
ln -s /usr/local/bin/argocd /usr/local/bin/argocd-repo-server && \
|
|
|
|
|
ln -s /usr/local/bin/argocd /usr/local/bin/argocd-cmp-server && \
|
|
|
|
|
ln -s /usr/local/bin/argocd /usr/local/bin/argocd-application-controller && \
|
|
|
|
|
ln -s /usr/local/bin/argocd /usr/local/bin/argocd-dex && \
|
|
|
|
|
ln -s /usr/local/bin/argocd /usr/local/bin/argocd-notifications && \
|
2022-04-15 00:25:08 +00:00
|
|
|
ln -s /usr/local/bin/argocd /usr/local/bin/argocd-applicationset-controller && \
|
2024-12-16 21:59:09 +00:00
|
|
|
ln -s /usr/local/bin/argocd /usr/local/bin/argocd-k8s-auth && \
|
|
|
|
|
ln -s /usr/local/bin/argocd /usr/local/bin/argocd-commit-server
|
2021-01-20 19:28:06 +00:00
|
|
|
|
2022-08-05 19:17:35 +00:00
|
|
|
USER $ARGOCD_USER_ID
|