forked from redhat-developer/web-terminal-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontroller.Dockerfile
More file actions
49 lines (39 loc) · 1.57 KB
/
Copy pathcontroller.Dockerfile
File metadata and controls
49 lines (39 loc) · 1.57 KB
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
47
48
49
# Copyright (c) 2021-2024 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
# Red Hat, Inc. - initial API and implementation
#
# https://access.redhat.com/containers/?tab=tags#/registry.access.redhat.com/ubi9/go-toolset
FROM registry.access.redhat.com/ubi9/go-toolset:1.26.3-1782219569 AS builder
ENV GOPATH=/go/
USER root
RUN go env GOPROXY
WORKDIR /web-terminal-operator
# Copy the Go Modules manifests
COPY go.mod go.mod
COPY go.sum go.sum
# cache deps before building and copying source so that we don't need to re-download as much
# and so that source changes don't invalidate our downloaded layer
RUN go mod download
# Copy the go source
COPY . .
# compile terminal controller binary
RUN make compile
# https://access.redhat.com/containers/?tab=tags#/registry.access.redhat.com/ubi9-minimal
FROM registry.access.redhat.com/ubi9/ubi-minimal:9.7-1771346502
RUN microdnf -y update && microdnf clean all && rm -rf /var/cache/yum && echo "Installed Packages" && rpm -qa | sort -V && echo "End Of Installed Packages"
WORKDIR /
COPY --from=builder /web-terminal-operator/_output/bin/web-terminal-controller /usr/local/bin/web-terminal-controller
ENV USER_UID=1001 \
USER_NAME=web-terminal-controller
COPY build/bin /usr/local/bin
RUN /usr/local/bin/user_setup
USER ${USER_UID}
ENTRYPOINT ["/usr/local/bin/entrypoint"]
CMD /usr/local/bin/web-terminal-controller
# append Brew metadata here