-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile_ARM64
33 lines (24 loc) · 911 Bytes
/
Dockerfile_ARM64
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
#
# Copyright (c) 2018, 2019 Intel
#
# SPDX-License-Identifier: Apache-2.0
#
ARG ALPINE=golang:1.11-alpine
FROM ${ALPINE} AS builder
ARG ALPINE_PKG_BASE="build-base git openssh-client"
ARG ALPINE_PKG_EXTRA=""
# Replicate the APK repository override.
# If it is no longer necessary to avoid the CDN mirros we should consider dropping this as it is brittle.
RUN sed -e 's/dl-cdn[.]alpinelinux.org/mirrors.ustc.edu.cn/g' -i~ /etc/apk/repositories
# Install our build time packages.
RUN apk add ${ALPINE_PKG_BASE} ${ALPINE_PKG_EXTRA}
WORKDIR $GOPATH/src/github.com/edgexfoundry/device-opcua-go
COPY . .
RUN make build-arm64
# Next image - Copy built Go binary into new workspace
FROM scratch
ENV APP_PORT=49997
#expose command data port
EXPOSE $APP_PORT
COPY --from=builder /go/src/github.com/edgexfoundry/device-opcua-go/cmd /
CMD ["/device-opcua-arm64","--registry","--profile=docker","--confdir=/res"]