Repository navigation
Expand file tree
/
Copy pathDockerfile.pprof
More file actions
103 lines (81 loc) · 3.17 KB
/
Copy pathDockerfile.pprof
File metadata and controls
103 lines (81 loc) · 3.17 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# MIT License
#
# (C) Copyright [2019-2022,2024-2025] Hewlett Packard Enterprise Development LP
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
# Dockerfile for building the HMS Redfish Translation Service (RTS) with pprof support.
# The only difference from primary dockerfile is building with the pprof tag
FROM artifactory.algol60.net/docker.io/library/golang:1.24-alpine AS builder
RUN go env -w GO111MODULE=auto
# Copy all the necessary files to the image.
COPY cmd $GOPATH/src/github.com/Cray-HPE/hms-redfish-translation-service/cmd
COPY internal $GOPATH/src/github.com/Cray-HPE/hms-redfish-translation-service/internal
COPY vendor $GOPATH/src/github.com/Cray-HPE/hms-redfish-translation-service/vendor
RUN set -ex \
&& go build -tags pprof -v github.com/Cray-HPE/hms-redfish-translation-service/cmd/rfdispatcher \
&& go build -v github.com/Cray-HPE/hms-redfish-translation-service/cmd/vault_loader
### Final Stage ###
FROM artifactory.algol60.net/docker.io/alpine:3.22
LABEL maintainer="Hewlett Packard Enterprise"
EXPOSE 8082
STOPSIGNAL SIGTERM
# DMTF
ENV SCHEMA_VERSION=2019.1
ENV PRIVILEGE_REGISTRY_VERSION=1.0.4
# Runtime
ENV LOG_LEVEL=INFO
ENV CONTRIB_DIR_PREFIX=/
ENV SCRIPT_DIR_PREFIX=/scripts
ENV RTS_DNS_PROVIDER=none
ENV CONFIGS_DIR_PREFIX=/
# Redis
ENV REDIS_HOSTNAME=localhost
ENV REDIS_PORT=6379
# Vault
ENV VAULT_ADDR=http://localhost:8200
ENV HMS_VAULT_KEYPATH=hms-creds
ENV JAWS_VAULT_KEYPATH=pdu-creds
# HSM
ENV HSM_URL=http://localhost:27779
# HSM
ENV SLS_URL=http://localhost:8376
# Refish Eventing
ENV COLLECTOR_URL=http://hms-hmcollector
# JAWS Backend helper
ENV JAWS_POLLING_ENABLED=true
ENV JAWS_POLLING_INTERVAL=10
ENV JAWS_POLLING_WORKERS=30
ENV GODEBUG=tlsrsakex=1
RUN set -ex \
&& apk -U upgrade \
&& apk add redis curl \
&& mkdir /rts-logs \
&& chown 65534:65534 /rts-logs
COPY --from=builder /go/rfdispatcher /usr/local/bin
COPY --from=builder /go/vault_loader /usr/local/bin
COPY scripts/wait-for.sh /
COPY docker-entrypoint.sh /
COPY contrib ${CONTRIB_DIR_PREFIX}contrib
COPY configs ${CONFIGS_DIR_PREFIX}configs
COPY scripts /scripts
COPY .version /
# nobody 65534:65534
USER 65534:65534
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["rfdispatcher"]