-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
61 lines (45 loc) · 1.1 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
51
52
53
54
55
56
57
58
59
60
61
# syntax=docker/dockerfile:1.3-labs
FROM alpine:latest
ARG TASKD_COMMIT="1.2.0"
ENV TASKDHOME="/home/taskd"
ENV TASKDDATA="$TASKDHOME/data"
ENV TASKDGIT="$TASKDHOME/taskd.git"
ENV TASKDPKI="$TASKDDATA/pki"
RUN <<EOF
addgroup taskd
adduser -h "${TASKDHOME}" -g '' -G taskd -D taskd
apk upgrade -U
apk add --no-cache --virtual=taskd-build-dependencies \
python3 \
git \
cmake \
make \
gcc \
g++
apk add --no-cache \
libgcc \
gnutls-dev \
gnutls-utils \
util-linux-dev \
gettext \
bash
ln -sf $(which python3) /usr/local/bin/python
git clone https://github.com/GothenburgBitFactory/taskserver.git "${TASKDGIT}"
cd "${TASKDGIT}"
git checkout "${COMMIT}"
git submodule init
git submodule update
cmake -DCMAKE_BUILD_TYPE=release .
make
make install
apk del taskd-build-dependencies
mkdir -p "${TASKDDATA}"
cp -r "${TASKDGIT}/pki" "${TASKDPKI}"
chown -R "taskd:taskd" "${TASKDHOME}"
EOF
COPY entrypoint.sh "${TASKDHOME}/entrypoint.sh"
COPY vars.template "${TASKDPKI}/vars.template"
EXPOSE 53589
USER taskd
WORKDIR "${TASKDDATA}"
ENTRYPOINT ["/home/taskd/entrypoint.sh"]