-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile_armv7l
More file actions
42 lines (42 loc) · 867 Bytes
/
Dockerfile_armv7l
File metadata and controls
42 lines (42 loc) · 867 Bytes
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
# syntax=docker/dockerfile:1
#
ARG IMAGEBASE=frommakefile
#
FROM ${IMAGEBASE}
#
ENV \
CGO_ENABLED=0 \
GOARCH=arm \
GOARM=7 \
GOOS=linux \
GOPATH=/go \
GOTOOLCHAIN=local
#
RUN set -xe \
&& (if [ ! -e /etc/nsswitch.conf ]; then echo 'hosts: files dns' > /etc/nsswitch.conf; fi) \
&& apk add --no-cache --purge -uU \
ca-certificates \
libc-dev \
go \
go-doc \
git \
&& mkdir -p \
${GOPATH}/bin \
${GOPATH}/pkg \
${GOPATH}/src \
&& chown -R ${S6_USER:-alpine} ${GOPATH} \
&& chmod -R 1777 ${GOPATH} \
&& rm -rf /var/cache/apk/* /tmp/*
#
COPY root/ /
#
ENV \
GOBIN=${GOPATH}/bin \
GOCACHE=${GOPATH}/.cache \
GOENV=${GOPATH}/env \
GOMODCACHE=${GOPATH}/pkg/mod \
PATH=${GOPATH}/bin:${PATH}
#
ENTRYPOINT ["/usershell"]
#
CMD ["go", "version"]