forked from edgexfoundry/device-opc-ua
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
31 lines (23 loc) · 798 Bytes
/
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
#
# Copyright (c) 2018, 2019 Intel
# Copyright (c) 2021 Schneider Electric
#
# SPDX-License-Identifier: Apache-2.0
#
FROM golang:1.20-alpine3.18 AS builder
WORKDIR /device-opcua-go
# Install our build time packages.
RUN apk update && apk add --no-cache make git zeromq-dev gcc pkgconfig musl-dev
COPY . .
RUN make build
# Next image - Copy built Go binary into new workspace
FROM alpine:3.17
# dumb-init needed for injected secure bootstrapping entrypoint script when run in secure mode.
RUN apk add --update --no-cache zeromq dumb-init
# expose command data port
EXPOSE 59997
COPY --from=builder /device-opcua-go/cmd/device-opcua /
COPY --from=builder /device-opcua-go/cmd/res /res
COPY LICENSE /
ENTRYPOINT ["/device-opcua"]
CMD ["-cp=consul.http://edgex-core-consul:8500", "--registry"]