This repository is currently being migrated. It's locked while the migration is in progress.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
45 lines (40 loc) · 1.56 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
# Build the manager binary
FROM golang:1.18 as builder
WORKDIR /workspace
# Copy the Go Modules manifests
COPY go.mod go.mod
COPY go.sum go.sum
# Copy the go source
COPY main.go main.go
COPY api/ api/
COPY controllers/ controllers/
COPY endpoints/ endpoints/
COPY managers/ managers/
COPY pkg/ pkg/
COPY vendor/ vendor/
# Build
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -mod=vendor -a -o manager main.go
# Use ubi8-minimal as the base image to package the manager binary. Refer to
# https://catalog.redhat.com/software/containers/ubi8/ubi-minimal/5c359a62bed8bd75a2c3fba8
# for more details
FROM registry.access.redhat.com/ubi8/ubi-minimal
WORKDIR /
ARG VERSION=v1.0.0
LABEL name="portal-manager" \
maintainer="[email protected]" \
vendor="StorageOS" \
version="${VERSION}" \
release="1" \
distribution-scope="public" \
architecture="x86_64" \
url="https://docs.storageos.com" \
io.k8s.description="portal-manager is responsible for communication with the management portal." \
io.k8s.display-name="StorageOS Portal Manager" \
io.openshift.tags="" \
summary="The StorageOS Portal Manager is responsible for communication with the management portal. It watches for changes to subscribed Kubernetes object kinds and publishes them over MQTT to Google IOT Core." \
description="This container is not intended to be run manually. Instead, use the StorageOS Operator to install and manage StorageOS."
RUN mkdir -p /licenses
COPY LICENSE /licenses/LICENSE
COPY --from=builder /workspace/manager .
USER 65532:65532
ENTRYPOINT ["/manager"]