forked from helm-unittest/helm-unittest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFedora.Dockerfile
39 lines (31 loc) · 1.26 KB
/
Fedora.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
FROM --platform=$BUILDPLATFORM fedora:40@sha256:d0207dbb078ee261852590b9a8f1ab1f8320547be79a2f39af9f3d23db33735e
# variable "HELM_VERSION" must be passed as docker environment variables during the image build
# docker buildx build --load --no-cache --platform linux/amd64 --build-arg HELM_VERSION=3.13.0 -t fedora/helm-unittest:test -f Fedora.Dockerfile .
ARG BUILDPLATFORM
ARG TARGETOS
ARG TARGETARCH
ARG HELM_VERSION
COPY plugin.yaml helm-unittest/plugin.yaml
COPY install-binary.sh helm-unittest/install-binary.sh
COPY untt helm-unittest/untt
ENV SKIP_BIN_INSTALL=1
ENV HELM_BASE_URL="https://get.helm.sh"
ENV HELM_TAR_FILE="helm-v${HELM_VERSION}-${TARGETOS}-${TARGETARCH}.tar.gz"
ENV PLUGIN_URL="helm-unittest"
# Install the plugin for all users
ENV HELM_DATA_HOME=/usr/local/share/helm
RUN yum install -y git && \
curl -L ${HELM_BASE_URL}/${HELM_TAR_FILE} |tar xvz && \
mv ${TARGETOS}-${TARGETARCH}/helm /usr/bin/helm && \
chmod +x /usr/bin/helm && \
helm plugin install ${PLUGIN_URL} && \
rm -rf ${TARGETOS}-${TARGETARCH} && \
yum remove -y git && \
rm -rf /var/cache/yum/* && \
groupadd -r helmgroup && \
useradd -u 1000 -r helmuser -g helmgroup
USER helmuser
WORKDIR /apps
VOLUME [ "/apps" ]
ENTRYPOINT ["helm", "unittest"]
CMD ["--help"]