forked from cloudfoundry-incubator/quarks-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-s390x
28 lines (23 loc) · 935 Bytes
/
Dockerfile-s390x
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
ARG quarkz_base_version="0.0.6"
FROM s390x/alpine AS dumb-init
ADD https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_s390x /usr/bin/dumb-init
RUN chmod +x /usr/bin/dumb-init
FROM s390x/golang:1.13.3 AS build
ARG GO111MODULE="on"
ENV GO111MODULE $GO111MODULE
WORKDIR /go/src/code.cloudfoundry.org/quarks-operator
# First, download dependencies so we can cache this layer
COPY go.mod .
COPY go.sum .
RUN if [ "${GO111MODULE}" = "on" ]; then go mod download; fi
# Copy the rest of the source code and build
COPY . .
RUN make build && \
cp -p binaries/cf-operator /usr/local/bin/cf-operator
FROM quarkz/cf-operator-base:$quarkz_base_version
RUN groupadd -g 1000 vcap && \
useradd -r -u 1000 -g vcap vcap
USER vcap
COPY --from=dumb-init /usr/bin/dumb-init /usr/bin/dumb-init
COPY --from=build /usr/local/bin/cf-operator /usr/local/bin/cf-operator
ENTRYPOINT ["/usr/bin/dumb-init", "--", "cf-operator"]