docker-media-repo/Dockerfile
Jan Christian Grünhage d671ada6b7
All checks were successful
the build was successful
initial impl
2018-01-13 15:21:19 +01:00

23 lines
779 B
Docker

FROM docker.jcg.re/base-alpine
RUN apk add --no-cache \
-t build-deps \
go \
git \
musl-dev \
&& cd /tmp \
&& git clone https://github.com/turt2live/matrix-media-repo \
&& cd matrix-media-repo \
&& GOPATH=`pwd` go get github.com/constabulary/gb/... \
&& PATH=$PATH:`pwd`/bin gb vendor restore \
&& GOPATH=`pwd`:`pwd`/vendor go build -o bin/media_repo ./src/github.com/turt2live/matrix-media-repo/cmd/media_repo/ \
&& GOPATH=`pwd`:`pwd`/vendor go build -o bin/import_synapse ./src/github.com/turt2live/matrix-media-repo/cmd/import_synapse/ \
&& cp bin/media_repo bin/import_synapse /usr/local/bin \
&& cp config.sample.yaml /etc/media_repo.yaml.sample \
&& cd / \
&& rm -rf /tmp/* \
&& apk del build-deps
COPY root /
VOLUME /data
EXPOSE 8000