-
Notifications
You must be signed in to change notification settings - Fork 21
/
Dockerfile
29 lines (24 loc) · 848 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
29
FROM node:8-alpine
MAINTAINER Filip Valder <[email protected]>
LABEL maintainer="Filip Valder <[email protected]>"
ARG GIT_REPOSITORY=https://github.com/adsr/irslackd.git
ARG GIT_BRANCH=master
ARG SSL_LOCAL_CERTIFICATE_SUBJ="/CN=irslackd docker gateway"
ENV IRSLACKD_PORT=6697
RUN apk update && \
apk add \
bash \
git \
openssl \
&& \
mkdir /opt/irslackd && \
git clone --single-branch -b ${GIT_BRANCH} ${GIT_REPOSITORY} /tmp/irslackd.git && \
cd /tmp/irslackd.git && \
git archive ${GIT_BRANCH} | tar -xC /opt/irslackd && \
cd /opt/irslackd && \
npm install && \
./bin/create_tls_key.sh -s "${SSL_LOCAL_CERTIFICATE_SUBJ}" && \
rm -rf /tmp/irslackd.git && \
apk del git && \
rm -rf /var/cache/apk/*
CMD ["sh", "-c", "/opt/irslackd/irslackd -a 0.0.0.0 -p ${IRSLACKD_PORT}"]