pgweb/Dockerfile

30 lines
828 B
Docker
Raw Normal View History

2022-06-28 06:31:57 +03:00
# ------------------------------------------------------------------------------
# Builder Stage
# ------------------------------------------------------------------------------
FROM golang:1.18-buster AS build
WORKDIR /build
ADD . /build
RUN go mod download
RUN make build
# ------------------------------------------------------------------------------
# Release Stage
# ------------------------------------------------------------------------------
FROM debian:buster-slim
2014-10-28 11:02:27 +03:00
RUN \
2022-06-28 06:31:57 +03:00
apt-get update && \
apt-get install -y ca-certificates openssl postgresql netcat && \
update-ca-certificates && \
2022-06-28 06:31:57 +03:00
apt-get clean autoclean && \
apt-get autoremove --yes && \
rm -rf /var/lib/{apt,dpkg,cache,log}/
COPY --from=build /build/pgweb /usr/bin/pgweb
2014-10-28 11:02:27 +03:00
2015-07-15 06:26:32 +03:00
EXPOSE 8081
2022-06-28 06:31:57 +03:00
CMD ["/usr/bin/pgweb", "--bind=0.0.0.0", "--listen=8081"]