forked from edgexfoundry/device-opc-ua
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
28 lines (20 loc) · 787 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
#
# Copyright (c) 2018, 2019 Intel
#
# SPDX-License-Identifier: Apache-2.0
#
FROM golang:1.11-alpine AS builder
WORKDIR /go/src/github.com/edgexfoundry/device-opcua-go
# Replicate the APK repository override.
RUN sed -e 's/dl-cdn[.]alpinelinux.org/mirrors.ustc.edu.cn/g' -i~ /etc/apk/repositories
# Install our build time packages.
RUN apk update && apk add make git
COPY . .
RUN make build
# Next image - Copy built Go binary into new workspace
FROM scratch
# expose command data port
EXPOSE 49997
COPY --from=builder /go/src/github.com/edgexfoundry/device-opcua-go/cmd/device-opcua /
COPY --from=builder /go/src/github.com/edgexfoundry/device-opcua-go/cmd/res/docker/configuration.toml /res/docker/configuration.toml
CMD ["/device-opcua", "--profile=docker", "--confdir=/res"]