This repository has been archived by the owner on Apr 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 45
/
Dockerfile
46 lines (40 loc) · 1.69 KB
/
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# quay.io/ansible/creator-ee:v0.18.0
FROM quay.io/ansible/creator-ee@sha256:c89ecbcf47bfa956a2ed3c4939cd29a53298943c8db11eb35d20b9b939ba2a48
ENV HOME=/home/runner
# install kubernetes module required by molecule
RUN pip3 install kubernetes==26.1.0
## kubectl
RUN \
microdnf install -y which && \
microdnf clean all && \
curl -LO https://dl.k8s.io/release/`curl -LS https://dl.k8s.io/release/stable.txt`/bin/linux/amd64/kubectl && \
chmod +x ./kubectl && \
mv ./kubectl /usr/local/bin && \
kubectl version --client
## helm
RUN \
TEMP_DIR="$(mktemp -d)" && \
cd "${TEMP_DIR}" && \
HELM_VERSION="3.7.0" && \
HELM_ARCH="linux-amd64" && \
HELM_TGZ="helm-v${HELM_VERSION}-${HELM_ARCH}.tar.gz" && \
HELM_TGZ_URL="https://get.helm.sh/${HELM_TGZ}" && \
curl -sSLO "${HELM_TGZ_URL}" && \
curl -sSLO "${HELM_TGZ_URL}.sha256sum" && \
sha256sum -c "${HELM_TGZ}.sha256sum" 2>&1 | grep OK && \
tar -zxvf "${HELM_TGZ}" && \
mv "${HELM_ARCH}"/helm /usr/local/bin/helm && \
cd - && \
rm -rf "${TEMP_DIR}"
# nodejs 16 + VSCODE_NODEJS_RUNTIME_DIR are required on ubi9 based images
# until we fix https://github.com/eclipse/che/issues/21778
# When fixed, we won't need this Dockerfile anymore.
# c.f. https://github.com/che-incubator/che-code/pull/120
RUN \
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash && \
export NVM_DIR="$HOME/.nvm" && \
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \
nvm install 16.20.0
ENV VSCODE_NODEJS_RUNTIME_DIR="$HOME/.nvm/versions/node/v16.20.0/bin/"
# Set permissions on /etc/passwd and /home to allow arbitrary users to write
RUN chgrp -R 0 /home && chmod -R g=u /etc/passwd /etc/group /home