forked from ROCm/gpu-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.build
More file actions
82 lines (68 loc) · 2.37 KB
/
Dockerfile.build
File metadata and controls
82 lines (68 loc) · 2.37 KB
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
ARG BUILD_BASE_IMG=ubuntu:22.04
FROM ${BUILD_BASE_IMG}
# Set environment variables
ENV DEBIAN_FRONTEND=noninteractive
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US:en
ENV LC_ALL=en_US.UTF-8
# Install necessary packages
RUN apt-get update -y && \
apt-get install -y --no-install-recommends \
openssh-client \
build-essential \
wget \
git \
curl \
gosu \
gpg \
make \
python3-sphinx \
python3-pip \
libsqlite3-dev \
protobuf-compiler \
locales \
ca-certificates \
sudo && \
apt-get clean && rm -rf /var/lib/apt/lists/*
# Add Docker's official GPG key
RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
# Add Docker APT repository
RUN echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu jammy stable" \
> /etc/apt/sources.list.d/docker.list
RUN apt-get update -y && \
apt-get install -y --no-install-recommends \
docker-ce \
docker-ce-cli \
docker-buildx-plugin && \
apt-get clean && rm -rf /var/lib/apt/lists/*
# Set up locale
RUN localedef -i en_US -f UTF-8 en_US.UTF-8
# Install Go
RUN wget https://go.dev/dl/go1.23.4.linux-amd64.tar.gz && \
tar -C /usr/local -xzf go1.23.4.linux-amd64.tar.gz && \
rm go1.23.4.linux-amd64.tar.gz
ENV PATH="/usr/local/go/bin:${PATH}"
RUN curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 && \
chmod 700 get_helm.sh && \
./get_helm.sh && rm get_helm.sh
RUN curl -sSL https://github.com/arttor/helmify/releases/download/v0.4.13/helmify_Linux_x86_64.tar.gz \
-o helmify_Linux_x86_64.tar.gz && \
tar -C /usr/local/bin/ -xzf helmify_Linux_x86_64.tar.gz && \
rm helmify_Linux_x86_64.tar.gz
RUN curl -o /usr/local/bin/kubectl -LO 'https://dl.k8s.io/release/v1.30.4/bin/linux/amd64/kubectl' && \
chmod +x /usr/local/bin/kubectl
ARG INSECURE_REGISTRY
RUN echo "INSECURE_REGISTRY is: $INSECURE_REGISTRY" && \
if [ -n "$INSECURE_REGISTRY" ]; then \
mkdir -p /etc/docker && \
echo "{ \
\"insecure-registries\": [\"$INSECURE_REGISTRY\"] \
}" > /etc/docker/daemon.json; \
else \
echo "INSECURE_REGISTRY is not set"; \
fi
# Copy entrypoint script
COPY entrypoint_build.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
# Entrypoint
ENTRYPOINT ["/entrypoint.sh"]