postgres-tcpify/Dockerfile

11 lines
242 B
Docker
Raw Permalink Normal View History

2023-01-23 20:16:10 +01:00
FROM alpine:3
ENV LISTEN_PORT=5432
ENV SOCKET_PATH=/var/run/postgresql/.s.PGSQL.5432
RUN apk add --no-cache socat
USER nobody
CMD ["/bin/sh", "-c", "/usr/bin/socat \"tcp-listen:$LISTEN_PORT,reuseaddr,fork\" \"unix-client:$SOCKET_PATH\""]