Feature/dockerfile (#73)

* Working Dockerfile

* No need for crystal in distribution image
This commit is contained in:
Alistair A. Israel 2018-08-25 18:54:13 +08:00 committed by V. Elenhaupt
parent 0d41ecdc29
commit 970d341ea0
2 changed files with 21 additions and 0 deletions

8
.dockerignore Normal file
View file

@ -0,0 +1,8 @@
.*
Dockerfile
Makefile
bench/
bin/
spec/
*.html

13
Dockerfile Normal file
View file

@ -0,0 +1,13 @@
FROM alpine:3.8 as builder
RUN apk add --update crystal shards openssl-dev yaml-dev libxml2-dev musl-dev
RUN mkdir /ameba
WORKDIR /ameba
COPY . /ameba/
RUN shards build --release
FROM alpine:3.8
RUN apk add --update openssl yaml pcre gc libevent libgcc
RUN mkdir /src
WORKDIR /src
COPY --from=builder /ameba/bin/ameba /usr/bin/
ENTRYPOINT [ "/usr/bin/ameba" ]