Use make to build ameba in docker, add installation info

This commit is contained in:
Vitalii Elenhaupt 2018-08-25 13:55:07 +03:00
parent 970d341ea0
commit bbb0cf51e7
No known key found for this signature in database
GPG key ID: 7558EF3A4056C706
3 changed files with 19 additions and 9 deletions

View file

@ -1,8 +1,4 @@
.*
Dockerfile
Makefile
bench/
bin/
spec/
*.html
!Makefile
!shard.yml
!src

View file

@ -1,9 +1,9 @@
FROM alpine:3.8 as builder
RUN apk add --update crystal shards openssl-dev yaml-dev libxml2-dev musl-dev
RUN apk add --update crystal shards openssl-dev yaml-dev musl-dev make
RUN mkdir /ameba
WORKDIR /ameba
COPY . /ameba/
RUN shards build --release
RUN make clean && make
FROM alpine:3.8
RUN apk add --update openssl yaml pcre gc libevent libgcc

View file

@ -82,6 +82,20 @@ $ brew tap veelenga/tap
$ brew install ameba
```
### Docker
Build the image:
```sh
$ docker build -t ameba/ameba .
```
To use the resulting image on a local source folder, mount the current (or target) directory into `/src`:
```sh
$ docker run -v $(pwd):/src ameba/ameba
```
### From sources
```sh