forked from openshift/windows-machine-config-bootstrapper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.tools
41 lines (30 loc) · 1.46 KB
/
Dockerfile.tools
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
# This image will be used in OpenShift CI so that we can run tests which require more utilities
# than the default golang image has to offer
FROM centos:centos8
WORKDIR /go/src/github.com/openshift/windows-machine-config-bootstrapper/
COPY . .
RUN yum -y update && yum -y install git make python2 python2-pip gcc jq
# Download and install Go
RUN curl -L -s https://dl.google.com/go/go1.12.13.linux-amd64.tar.gz > go1.12.13.linux-amd64.tar.gz \
&& sha256sum go1.12.13.linux-amd64.tar.gz \
&& echo "da036454cb3353f9f507f0ceed4048feac611065e4e1818b434365eb32ac9bdc go1.12.13.linux-amd64.tar.gz" | sha256sum -c \
&& tar -xzf go1.12.13.linux-amd64.tar.gz \
&& mv go /usr/local \
&& rm -rf ./go*
# Download and install oc
RUN curl -L -s https://mirror.openshift.com/pub/openshift-v4/clients/ocp/4.2.2/openshift-client-linux-4.2.2.tar.gz -o openshift-origin-client-tools.tar.gz \
&& echo "8f853477fa99cfc4087ad2ddf9b13b9d22e5fc4d5dc24c63ec5b0a91bb337fc9 openshift-origin-client-tools.tar.gz" | sha256sum -c \
&& tar -xzf openshift-origin-client-tools.tar.gz \
&& mv oc /usr/bin/oc \
&& mv kubectl /usr/bin/kubectl \
&& rm -rf ./openshift* \
&& oc version
# Install ansible and required packages
RUN pip2 install ansible pywinrm
# Make Ansible happy with arbitrary UID/GID in OpenShift.
RUN chmod g=u /etc/passwd /etc/group
# Allow building the WMCB
RUN chmod -R g=u /go
ENV PATH="${PATH}:/usr/local/go/bin"
ENV GOPATH="/go"
ENTRYPOINT [ "/bin/bash" ]