-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.armhf
44 lines (40 loc) · 1.27 KB
/
Dockerfile.armhf
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
FROM lsiobase/alpine:arm32v7-3.9
# set version label
ARG GATEWAY_RELEASE
LABEL maintainer="thelamer"
RUN \
echo "**** install build packages ****" && \
apk add --no-cache --virtual=build-dependencies \
nodejs-npm && \
echo "**** install runtime packages ****" && \
apk add --no-cache \
apache2-utils \
certbot \
curl \
nodejs && \
echo "**** install gateway node application ****" && \
if [ -z ${GATEWAY_RELEASE+x} ]; then \
GATEWAY_RELEASE=$(curl -sX GET "https://api.github.com/repos/Taisun-Docker/gateway/releases/latest" \
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
fi && \
mkdir -p \
/usr/src/Taisun-gateway && \
curl -o \
/tmp/gateway.tar.gz -L \
"https://github.com/Taisun-Docker/gateway/archive/${GATEWAY_RELEASE}.tar.gz" && \
tar -xzf \
/tmp/gateway.tar.gz -C \
/usr/src/Taisun-gateway --strip-components=1 && \
echo ${GATEWAY_RELEASE} > /usr/src/Taisun-gateway/version && \
echo "**** install node modules ****" && \
npm install --prefix /usr/src/Taisun-gateway && \
chown -R abc:abc /usr/src/Taisun-gateway && \
echo "**** cleanup ****" && \
apk del --purge \
build-dependencies && \
rm -rf \
/tmp/*
# add local files
COPY root/ /
# App runs on 3000
EXPOSE 3000