-
-
Notifications
You must be signed in to change notification settings - Fork 130
Expand file tree
/
Copy pathDockerfile
More file actions
20 lines (14 loc) · 614 Bytes
/
Dockerfile
File metadata and controls
20 lines (14 loc) · 614 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
FROM golang:alpine
RUN apk add --update git bash openssl
RUN mkdir -p $GOPATH/src/github.com/sachaos/todoist
WORKDIR $GOPATH/src/github.com/sachaos/todoist
RUN git clone https://github.com/sachaos/todoist.git .
RUN go install
ARG TODOIST_API_TOKEN
RUN mkdir -p $HOME/.config/todoist
RUN echo '{"token": "##TOKEN##", "color":"true"}' >> $HOME/.config/todoist/config.json
RUN sed -i 's|##TOKEN##|'$TODOIST_API_TOKEN'|g' $HOME/.config/todoist/config.json
RUN chmod 600 $HOME/.config/todoist/config.json
WORKDIR $GOPATH
RUN echo 'alias todoist="todoist sync && todoist"' >> $HOME/.bashrc
RUN source $HOME/.bashrc