mirror of
https://github.com/hanzoai/deploy.git
synced 2026-10-07 08:44:50 +00:00
Signed-off-by: argoproj-renovate[bot] <161757507+argoproj-renovate[bot]@users.noreply.github.com> Co-authored-by: argoproj-renovate[bot] <161757507+argoproj-renovate[bot]@users.noreply.github.com>
145 lines
5.8 KiB
Docker
145 lines
5.8 KiB
Docker
FROM docker.io/library/redis:8.8.0@sha256:0a972391db0b24ec336e35d1bc98b237237e26f82bf5120cf2f6b1688d1df973 AS redis
|
|
|
|
# There are libraries we will want to copy from here in the final stage of the
|
|
# build, but the COPY directive does not have a way to determine system
|
|
# architecture, so we create a symlink here to facilitate copying.
|
|
RUN ln -s /usr/lib/$(uname -m)-linux-gnu /usr/lib/linux-gnu
|
|
|
|
# Please make sure to also check the contained yarn version and update the references below when upgrading this image's version
|
|
FROM docker.io/library/node:24.17.0@sha256:032e78d7e54e352129831743737e3a83171d9cc5b5896f411649c597ce0b11ea AS node
|
|
|
|
FROM docker.io/library/golang:1.26.5@sha256:63f132d58c1f589f0dcda584933a9bb44bfda1150f1506377f5a902f34d86033 AS golang
|
|
|
|
FROM docker.io/library/registry:3.1@sha256:85347ed2ecde64161c7a4788a4d7d3dcc9d6f86f7be95834022e3c6a423a945a AS registry
|
|
|
|
FROM docker.io/bitnamilegacy/kubectl:1.33@sha256:cd354d5b25562b195b277125439c23e4046902d7f1abc0dc3c75aad04d298c17 AS kubectl
|
|
|
|
FROM docker.io/library/ubuntu:26.04@sha256:53958ec7b67c2c9355df922dd08dbf0360611f8c3cdb656875e81873db9ffdba
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
# renovate: datasource=deb depName=git registryUrl=https://archive.ubuntu.com/ubuntu?suite=resolute&components=main,security&binaryArch=amd64
|
|
ARG GIT_APT_VERSION=1:2.53.0-1ubuntu1
|
|
|
|
# NOTE: binutils-gold contains the gold linker, which was recently removed
|
|
# from binutils, but is still nesessary for building lint-tools on arm64 only
|
|
# until this Golang issue is fixed: https://github.com/golang/go/issues/22040
|
|
RUN apt-get update && apt-get install --fix-missing --no-install-recommends -y \
|
|
ca-certificates \
|
|
curl \
|
|
openssh-server \
|
|
nginx \
|
|
fcgiwrap \
|
|
git=${GIT_APT_VERSION} \
|
|
gpg \
|
|
gpg-agent \
|
|
jq \
|
|
make \
|
|
wget \
|
|
gcc \
|
|
g++ \
|
|
sudo \
|
|
tini \
|
|
unzip \
|
|
zip && \
|
|
if [ "$(uname -m)" = "aarch64" ]; then \
|
|
apt-get install --fix-missing -y binutils-gold; \
|
|
fi && \
|
|
apt-get clean && \
|
|
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
|
|
|
COPY --from=golang /usr/local/go /usr/local/go
|
|
|
|
COPY --from=kubectl /opt/bitnami/kubectl/bin/kubectl /usr/local/bin/kubectl
|
|
|
|
ENV PATH=/dist:/go/bin:/usr/local/go/bin:/go/src/github.com/argoproj/argo-cd/dist:$PATH
|
|
ENV GOROOT=/usr/local/go
|
|
ENV GOPATH=/go
|
|
|
|
# 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
|
|
|
|
# Install build and test dependencies
|
|
COPY hack/install.sh hack/tool-versions.sh go.* ./
|
|
COPY hack/installers installers
|
|
COPY gitops-engine/go.* ./gitops-engine/
|
|
|
|
RUN ./install.sh helm && \
|
|
./install.sh kustomize && \
|
|
./install.sh codegen-tools && \
|
|
./install.sh codegen-go-tools && \
|
|
./install.sh lint-tools && \
|
|
./install.sh gotestsum && \
|
|
./install.sh git-lfs && \
|
|
go install github.com/mattn/goreman@latest && \
|
|
go install github.com/kisielk/godepgraph@latest && \
|
|
go install github.com/jstemmer/go-junit-report@latest && \
|
|
rm -rf /tmp/dl && \
|
|
rm -rf /tmp/helm && \
|
|
rm -rf /tmp/ks_*
|
|
|
|
# These are required for running end-to-end tests
|
|
COPY ./test/fixture/testrepos/id_rsa.pub /root/.ssh/authorized_keys
|
|
COPY ./test/fixture/testrepos/nginx.conf /etc/nginx/nginx.conf
|
|
COPY ./test/fixture/testrepos/sudoers.conf /etc/sudoers
|
|
COPY ./test/fixture/testrepos/ssh_host_*_key* /etc/ssh/
|
|
|
|
# Copy redis binaries to the image
|
|
COPY --from=redis /usr/local/bin/* /usr/local/bin/
|
|
|
|
# Copy redis dependencies/shared libraries
|
|
# Ubuntu 22.04+ has moved to OpenSSL3 and no longer provides these libraries
|
|
COPY --from=redis /usr/lib/linux-gnu/libssl.so.3 /usr/lib/linux-gnu/
|
|
COPY --from=redis /usr/lib/linux-gnu/libcrypto.so.3 /usr/lib/linux-gnu/
|
|
RUN mv /usr/lib/linux-gnu/libssl.so.3 /usr/lib/$(uname -m)-linux-gnu/ && \
|
|
mv /usr/lib/linux-gnu/libcrypto.so.3 /usr/lib/$(uname -m)-linux-gnu/ && \
|
|
rm -rf /usr/lib/linux-gnu/
|
|
|
|
# Copy registry binaries to the image
|
|
COPY --from=registry /bin/registry /usr/local/bin/
|
|
COPY --from=registry /etc/distribution/config.yml /etc/docker/registry/config.yml
|
|
|
|
# Copy node binaries
|
|
COPY --from=node /usr/local/lib/node_modules /usr/local/lib/node_modules
|
|
COPY --from=node /usr/local/bin/node /usr/local/bin
|
|
|
|
# Entrypoint is required for container's user management
|
|
COPY ./test/container/entrypoint.sh /usr/local/bin
|
|
|
|
ARG UID
|
|
|
|
# Prepare user configuration & build environments
|
|
RUN userdel -r ubuntu && \
|
|
useradd -l -u ${UID} -d /home/user -s /bin/bash user && \
|
|
echo "user ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/user && \
|
|
mkdir -p /home/user/.kube && \
|
|
mkdir -p /home/user/.cache && \
|
|
chown -R user /home/user && \
|
|
chgrp -R user /home/user && \
|
|
mkdir -p /go/src/github.com/gogo && \
|
|
mkdir -p /go/src/k8s.io && \
|
|
chown -R user /go && \
|
|
HOME=/home/user git config --global user.name "ArgoCD Test User" && \
|
|
HOME=/home/user git config --global user.email "[email protected]" && \
|
|
HOME=/home/user git config --global --add safe.directory '*' && \
|
|
mkdir -p /go/src && \
|
|
mkdir -p /go/pkg && \
|
|
chown -R user:user /go && \
|
|
mkdir -p /var/run/sshd && \
|
|
mkdir -p /root/.ssh && \
|
|
chown root /etc/ssh/ssh_host_*_key* && \
|
|
chmod 0600 /etc/ssh/ssh_host_*_key && \
|
|
mkdir -p /tmp/go-build-cache && \
|
|
chown -R user:user /tmp/go-build-cache && \
|
|
ln -s /usr/local/bin/node /usr/local/bin/nodejs && \
|
|
ln -s /usr/local/lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm && \
|
|
ln -s /usr/local/lib/node_modules/npm/bin/npx-cli.js /usr/local/bin/npx && \
|
|
npm install -g [email protected] && \
|
|
corepack enable && \
|
|
mkdir -p /var/lib/registry
|
|
|
|
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|