shard-ameba/Dockerfile
Alistair A. Israel 970d341ea0 Feature/dockerfile (#73)
* Working Dockerfile

* No need for crystal in distribution image
2018-08-25 13:54:13 +03:00

13 lines
361 B
Docker

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" ]