24 lines
779 B
Text
24 lines
779 B
Text
|
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
|