-
Notifications
You must be signed in to change notification settings - Fork 10
/
Dockerfile
50 lines (41 loc) · 1.42 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
ARG TAG
ARG VERSION
ARG BUILD_DATE
ARG ARCH
ARG REMOTE_TAG
ARG CFSSL_ARCH=${ARCH}
FROM thethingsnetwork/lorawan-stack:${REMOTE_TAG}
ARG TAG
ARG VERSION
ARG BUILD_DATE
ARG ARCH
ARG REMOTE_TAG
ARG CFSSL_ARCH
# Image metadata
LABEL maintainer="Xose Pérez <[email protected]>"
LABEL org.label-schema.schema-version="1.0"
LABEL org.label-schema.build-date=${BUILD_DATE}
LABEL org.label-schema.name="The Things Stack LoRaWAN Network Server"
LABEL org.label-schema.description="The Things Stack LoRaWAN Network Server"
LABEL org.label-schema.version="${VERSION} based on ${REMOTE_TAG}"
LABEL org.label-schema.vcs-type="Git"
LABEL org.label-schema.vcs-url="https://github.com/xoseperez/the-things-stack-docker"
LABEL org.label-schema.vcs-ref=${TAG}
LABEL org.label-schema.arch=${ARCH}
LABEL org.label-schema.license="Apache 2.0"
USER root:root
# Certificate creation tools
RUN apk --update --no-cache add openssl jq
ADD https://github.com/cloudflare/cfssl/releases/download/1.2.0/cfssl_linux-${CFSSL_ARCH} /usr/bin/cfssl
ADD https://github.com/cloudflare/cfssl/releases/download/1.2.0/cfssljson_linux-${CFSSL_ARCH} /usr/bin/cfssljson
RUN chmod +x /usr/bin/cfssl*
# Data folder
RUN mkdir /srv/data
RUN chmod 777 /srv/data
VOLUME [ "/srv/data" ]
WORKDIR /home/thethings
COPY runner/* .
RUN chmod +x start get_trust_certificate reset_certificates reset_database
ENV PATH="${PATH}:/home/thethings"
USER thethings:thethings
ENTRYPOINT [ "sh", "start" ]