-
Notifications
You must be signed in to change notification settings - Fork 232
/
Dockerfile
30 lines (27 loc) · 1.09 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
# This Dockerfile is used by openshift CI
# It builds an image containing crc and nss-wrapper for remote deployments, as well as the google cloud-sdk for nested GCE environments.
FROM registry.svc.ci.openshift.org/openshift/release:golang-1.15 AS builder
WORKDIR /go/src/github.com/code-ready/crc
COPY . .
RUN make cross
FROM registry.centos.org/centos/centos:7
COPY --from=builder /go/src/github.com/code-ready/crc /opt/crc
COPY --from=builder /go/src/github.com/code-ready/crc/out/linux-amd64/crc /bin/crc
COPY --from=builder /go/src/github.com/code-ready/crc/images/openshift-ci/mock-nss.sh /bin/mock-nss.sh
COPY --from=builder /go/src/github.com/code-ready/crc/images/openshift-ci/google-cloud-sdk.repo /etc/yum.repos.d/google-cloud-sdk.repo
RUN yum update -y && \
yum install --setopt=tsflags=nodocs -y \
genisoimage \
gettext \
google-cloud-sdk \
libvirt-client \
libvirt-libs \
nss_wrapper \
unzip \
openssh-clients && \
yum clean all && rm -rf /var/cache/yum/*
RUN mkdir /output && chown 1000:1000 /output
USER 1000:1000
ENV PATH /bin
ENV HOME /output
WORKDIR /output