Switch to alpine docker image, related to #164

This commit is contained in:
Dan Sosedoff 2016-06-27 20:48:36 -05:00
parent 80f2641bae
commit 76622dc32e

View File

@ -1,12 +1,17 @@
FROM golang:1.5
FROM alpine:3.3
MAINTAINER Dan Sosedoff <dan.sosedoff@gmail.com>
COPY . /go/src/github.com/sosedoff/pgweb
WORKDIR /go/src/github.com/sosedoff/pgweb
ENV PGWEB_VERSION 0.9.2
RUN go get github.com/tools/godep
RUN godep restore
RUN godep go build && godep go install
RUN \
apk update && \
apk add ca-certificates && \
update-ca-certificates && \
cd /tmp && \
wget https://github.com/sosedoff/pgweb/releases/download/v$PGWEB_VERSION/pgweb_linux_amd64.zip && \
unzip pgweb_linux_amd64.zip -d /usr/bin && \
mv /usr/bin/pgweb_linux_amd64 /usr/bin/pgweb && \
rm -f pgweb_linux_amd64.zip
EXPOSE 8081
CMD ["pgweb", "--bind", "0.0.0.0"]
CMD ["/usr/bin/pgweb", "--bind=0.0.0.0", "--listen=8081"]