2018-10-08 22:53:51 +02:00
|
|
|
## base image for github.com/lbryio/reflector.go release binaries
|
|
|
|
FROM golang:1.11.1
|
2018-10-16 09:29:14 +02:00
|
|
|
LABEL MAINTAINER="leopere [at] nixc [dot] us"
|
2018-10-08 22:53:51 +02:00
|
|
|
|
2018-10-14 14:30:06 +02:00
|
|
|
COPY start.sh /usr/local/bin/start
|
|
|
|
COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint
|
2018-10-08 22:53:51 +02:00
|
|
|
|
|
|
|
RUN adduser reflector --gecos GECOS --shell /bin/bash --disabled-password --home /data/
|
|
|
|
|
2018-10-09 16:28:13 +02:00
|
|
|
RUN export GOROOT=$GOPATH/bin && \
|
|
|
|
go get -v -u github.com/lbryio/reflector.go && \
|
2018-10-09 03:19:12 +02:00
|
|
|
cd "/go/src/github.com/lbryio/reflector.go" && \
|
2018-10-08 22:53:51 +02:00
|
|
|
make && \
|
2018-10-09 00:20:54 +02:00
|
|
|
mv ./bin/prism-bin /usr/bin/prism-bin && \
|
2018-10-08 22:53:51 +02:00
|
|
|
chmod +x /usr/bin/prism-bin
|
|
|
|
|
2018-10-09 00:20:54 +02:00
|
|
|
RUN wget -O /data/config.tmpl https://raw.githubusercontent.com/lbryio/reflector.go/master/config.tmpl && \
|
|
|
|
chown -R 1000:1000 /data/config.tmpl
|
|
|
|
|
2018-10-08 22:53:51 +02:00
|
|
|
USER reflector
|
|
|
|
|
2018-10-09 00:20:54 +02:00
|
|
|
CMD ["start"]
|