Skip to content

Commit 6649ed7

Browse files
committed
Improvements in Containerfile
Signed-off-by: Evans Mungai <[email protected]>
1 parent 4e7619e commit 6649ed7

File tree

1 file changed

+14
-16
lines changed

1 file changed

+14
-16
lines changed

applications/wg-easy/container/Containerfile

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ENV DEBIAN_FRONTEND=noninteractive \
1212
HOME=/home/devuser \
1313
SHELL=/bin/bash
1414

15-
# Install CLI tools
15+
# Install debian packages
1616
RUN apt-get update && apt-get install -y \
1717
curl \
1818
jq \
@@ -21,8 +21,18 @@ RUN apt-get update && apt-get install -y \
2121
gnupg \
2222
bash-completion \
2323

24-
# Install Helm
25-
&& curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash \
24+
# Install Google Cloud CLI
25+
&& echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list \
26+
&& curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | gpg --dearmor -o /usr/share/keyrings/cloud.google.gpg \
27+
&& apt-get update \
28+
&& apt-get install google-cloud-cli -y \
29+
30+
# Clean up
31+
&& apt-get purge -y gnupg \
32+
&& rm -rf /var/lib/apt/lists/*
33+
34+
# Install helm
35+
RUN curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash \
2636

2737
# Install kubectl
2838
&& curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" \
@@ -46,19 +56,7 @@ RUN apt-get update && apt-get install -y \
4656
| cut -d : -f 2,3 \
4757
| tr -d \") -o replicated.tar.gz \
4858
&& tar xf replicated.tar.gz replicated && rm replicated.tar.gz \
49-
&& mv replicated /usr/local/bin/replicated \
50-
51-
# Install Google Cloud CLI
52-
&& echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list \
53-
&& curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | gpg --dearmor -o /usr/share/keyrings/cloud.google.gpg \
54-
&& apt-get update \
55-
&& apt-get install google-cloud-cli -y \
56-
57-
# Clean up
58-
&& apt-get purge -y \
59-
curl \
60-
gnupg \
61-
&& rm -rf /var/lib/apt/lists/*
59+
&& mv replicated /usr/local/bin/replicated
6260

6361
# Create a non-root user for better security
6462
RUN groupadd -r devuser && useradd -r -g devuser -m -s /bin/bash devuser

0 commit comments

Comments
 (0)