forked from yetibot/yetibot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
43 lines (26 loc) · 956 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
FROM clojure:lein
# Yetibot needs curl. If we ever switch to alpine, make sure to install it.
MAINTAINER Trevor Hartman <[email protected]>
EXPOSE 3003
ENV WORKDIR /usr/src/app
ENV LOGDIR /var/log/yetibot
RUN mkdir -p $WORKDIR && mkdir -p $LOGDIR
COPY ./src $WORKDIR/src/
COPY ./resources $WORKDIR/resources/
COPY ./test $WORKDIR/test/
COPY ./project.clj $WORKDIR/project.clj
COPY .java.policy $HOME/
COPY .java.policy $WORKDIR/.java.policy
# overwrite the default location for linux
COPY .java.policy /docker-java-home/jre/lib/security/java.policy
# prepare ssh
RUN mkdir -p /root/.ssh && touch /root/.ssh/known_hosts
WORKDIR $WORKDIR
# lein deps requires git
# yetibot curl feature requires curl
RUN apt-get update && apt-get install curl git -y && apt-get clean
RUN lein deps
VOLUME $WORKDIR/config/
VOLUME $LOGDIR
HEALTHCHECK CMD curl --fail http://localhost:3003/healthz || exit 1
CMD ["lein", "with-profile", "+docker", "run"]