This repository has been archived by the owner on Sep 30, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathDockerfile
46 lines (41 loc) · 2.01 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
#
# This is the image that controls the standard build environment for releasing Metal3 components.
#
# The standard name for this image is metal3-io/base-image
#
FROM centos:7
ENV VERSION=1.11.5 \
GOCACHE=/go/.cache \
GOARM=5 \
GOPATH=/go \
GOROOT=/usr/local/go
ENV PATH=$PATH:$GOROOT/bin:$GOPATH/bin
COPY cbs-paas7-openshift-multiarch-el7-build.repo /etc/yum.repos.d/
RUN yum install -y epel-release && \
rpm -V epel-release && \
INSTALL_PKGS="bc bind-utils bsdtar ceph-common createrepo device-mapper device-mapper-persistent-data e2fsprogs ethtool file findutils gcc git glibc-static glib2-devel gpgme gpgme-devel hostname iptables jq krb5-devel libassuan libassuan-devel libseccomp-devel libvirt-devel lsof make mercurial nmap-ncat openssl protobuf-compiler rsync socat systemd-devel sysvinit-tools tar tito tree util-linux wget which xfsprogs zip goversioninfo" && \
yum install -y $INSTALL_PKGS && \
rpm -V $INSTALL_PKGS && \
yum clean all && \
touch /os-build-image && \
git config --system user.name metal3 && \
git config --system user.email [email protected]
RUN yum install -y golang && \
yum clean all && \
curl https://storage.googleapis.com/golang/go$VERSION.linux-amd64.tar.gz | tar -C /usr/local -xzf - && \
go get golang.org/x/tools/cmd/cover \
github.com/Masterminds/glide \
golang.org/x/tools/cmd/goimports \
github.com/tools/godep \
golang.org/x/lint/golint \
github.com/openshift/imagebuilder/cmd/imagebuilder && \
mv $GOPATH/bin/* /usr/bin/ && \
rm -rf $GOPATH/* $GOPATH/.cache && \
mkdir $GOPATH/bin && \
ln -s /usr/bin/imagebuilder $GOPATH/bin/imagebuilder && \
ln -s /usr/bin/goimports $GOPATH/bin/goimports
# TODO: symlink for backwards compatibility with hack/build-images.sh only, remove
RUN chmod g+xw -R $GOPATH && \
chmod g+xw -R $(go env GOROOT)
LABEL io.k8s.display-name="Metal3 Base Image" \
io.k8s.description="This is the base image for the Metal3 components."