forked from theunraveler/taskwarrior-web
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
36 lines (28 loc) · 1.27 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
FROM ruby:2.2.5-alpine
ADD Gemfile /taskwarrior-web/Gemfile
ADD taskwarrior-web.gemspec /taskwarrior-web/taskwarrior-web.gemspec
ADD lib/taskwarrior-web/version.rb /taskwarrior-web/lib/taskwarrior-web/version.rb
# Gemfile expects to run `git ls-files` (bad dependency, if deployment is not coming from git). When this is removed, just drop the 'apk add git' dependency.
RUN apk --update add --virtual task-dependencies build-base ruby-dev gnutls-dev util-linux-dev ca-certificates wget cmake \
&& apk add libstdc++ gnutls libuuid tzdata \
&& apk add git \
&& wget https://taskwarrior.org/download/task-2.5.1.tar.gz \
&& tar xzf task-2.5.1.tar.gz \
&& cd task-2.5.1 \
&& cmake -DCMAKE_BUILD_TYPE=release . \
&& make \
&& cp src/task /usr/bin/task \
&& cd .. \
&& rm -rf task-2.5.1 task-2.5.1.tar.gz \
&& cd /taskwarrior-web \
&& bundle install \
&& addgroup -S taskwarrior-web && adduser -D -S -g "" -h /taskdata -G taskwarrior-web taskwarrior-web \
&& rm -rf /root/.gem /root/.bundle \
&& apk del task-dependencies
ADD . /taskwarrior-web
USER taskwarrior-web
EXPOSE 3000
VOLUME /taskdata
ENV TASKRC "/taskdata/.taskrc"
ENV TASKDATA "/taskdata"
CMD ["/usr/bin/env", "rackup", "-p", "3000", "-o", "0.0.0.0", "/taskwarrior-web/config.ru"]