forked from openshift/assisted-service
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.assisted-service-build
30 lines (26 loc) · 1.5 KB
/
Dockerfile.assisted-service-build
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
FROM quay.io/centos/centos:stream9
ENV GOPATH=/go
ENV GOROOT=/usr/local/go
ENV VIRTUAL_ENV=/opt/venv
# A directory in the path with write permission even for non-root users
ENV TOOLS=/tools/
ENV PATH="$VIRTUAL_ENV/bin:$GOROOT/bin:$GOPATH/bin:$TOOLS:$PATH"
ENV CGO_CFLAGS="-g -O2 -Wno-return-local-addr"
COPY --from=quay.io/app-sre/golangci-lint:v1.37.1 /usr/bin/golangci-lint /usr/bin/golangci-lint
COPY --from=quay.io/goswagger/swagger:v0.28.0 /usr/bin/swagger /usr/bin/goswagger
COPY --from=quay.io/edge-infrastructure/swagger-codegen-cli:2.4.18 /opt/swagger-codegen-cli /opt/swagger-codegen-cli
COPY --from=registry.ci.openshift.org/openshift/release:golang-1.17 /usr/bin/gotestsum /usr/bin/make /usr/bin/
COPY --from=registry.ci.openshift.org/openshift/release:golang-1.17 /usr/local/go /usr/local/go
COPY --from=quay.io/openshift/origin-cli:latest /usr/bin/oc /usr/bin
COPY --from=quay.io/operator-framework/upstream-opm-builder:v1.16.1 /bin/opm /bin
RUN dnf install -y 'dnf-command(config-manager)' && \
dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo && \
dnf install -y --enablerepo=crb \
postgresql sqlite gcc genisoimage git docker-ce-cli libvirt-client libvirt-devel java && \
dnf clean all
WORKDIR /home/assisted-service
RUN mkdir build $TOOLS --mode g+xw
COPY ./hack/setup_env.sh ./dev-requirements.txt ./
RUN ./setup_env.sh podman_remote && ./setup_env.sh assisted_service
RUN chmod g+xw -R $GOPATH && chmod g+xw -R $(go env GOROOT)
COPY ./data /tmp/data