forked from jenkins-x/jx-git-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
26 lines (20 loc) · 931 Bytes
/
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
FROM ubuntu:20.04
ARG BUILD_DATE
ARG VERSION
ARG REVISION
ARG TARGETARCH
ARG TARGETOS
LABEL maintainer="jenkins-x"
# kubectl
ENV KUBECTL_VERSION 1.25.13
# see https://docs.docker.com/engine/reference/builder/#automatic-platform-args-in-the-global-scope
RUN echo using kubectl version ${KUBECTL_VERSION} and OS ${TARGETOS} arch ${TARGETARCH} && \
apt-get update && apt-get -y install curl ca-certificates git netcat-openbsd && \
curl -LO https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/${TARGETOS}/${TARGETARCH}/kubectl && \
mv kubectl /usr/bin/kubectl && \
chmod +x /usr/bin/kubectl
RUN echo using jx-git-operator version ${VERSION} and OS ${TARGETOS} arch ${TARGETARCH} && \
mkdir -p /home/.jx3 && \
curl -L https://github.com/jenkins-x/jx-git-operator/releases/download/v${VERSION}/jx-git-operator-${TARGETOS}-${TARGETARCH}.tar.gz | tar -zxv && \
mv jx-git-operator /usr/bin
ENTRYPOINT ["jx-git-operator"]