Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions 10/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -129,5 +129,7 @@ COPY docker-entrypoint.sh /usr/local/bin/
RUN ln -s usr/local/bin/docker-entrypoint.sh / # backwards compat
ENTRYPOINT ["docker-entrypoint.sh"]

RUN chmod g=u /etc/passwd

EXPOSE 5432
CMD ["postgres"]
2 changes: 2 additions & 0 deletions 10/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -146,5 +146,7 @@ COPY docker-entrypoint.sh /usr/local/bin/
RUN ln -s usr/local/bin/docker-entrypoint.sh / # backwards compat
ENTRYPOINT ["docker-entrypoint.sh"]

RUN chmod g=u /etc/passwd

EXPOSE 5432
CMD ["postgres"]
5 changes: 5 additions & 0 deletions 10/alpine/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ if [ "${1:0:1}" = '-' ]; then
fi

# allow the container to be started with `--user`
if ! whoami &> /dev/null; then
if [ -w /etc/passwd ]; then
echo "${USER_NAME:-default}:x:$(id -u):0:${USER_NAME:-default} user:${HOME}:/sbin/nologin" >> /etc/passwd
fi
fi
if [ "$1" = 'postgres' ] && [ "$(id -u)" = '0' ]; then
mkdir -p "$PGDATA"
chown -R postgres "$PGDATA"
Expand Down
5 changes: 5 additions & 0 deletions 10/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ if [ "${1:0:1}" = '-' ]; then
fi

# allow the container to be started with `--user`
if ! whoami &> /dev/null; then
if [ -w /etc/passwd ]; then
echo "${USER_NAME:-default}:x:$(id -u):0:${USER_NAME:-default} user:${HOME}:/sbin/nologin" >> /etc/passwd
fi
fi
if [ "$1" = 'postgres' ] && [ "$(id -u)" = '0' ]; then
mkdir -p "$PGDATA"
chown -R postgres "$PGDATA"
Expand Down
2 changes: 2 additions & 0 deletions 9.3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -130,5 +130,7 @@ COPY docker-entrypoint.sh /usr/local/bin/
RUN ln -s usr/local/bin/docker-entrypoint.sh / # backwards compat
ENTRYPOINT ["docker-entrypoint.sh"]

RUN chmod g=u /etc/passwd

EXPOSE 5432
CMD ["postgres"]
2 changes: 2 additions & 0 deletions 9.3/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -173,5 +173,7 @@ COPY docker-entrypoint.sh /usr/local/bin/
RUN ln -s usr/local/bin/docker-entrypoint.sh / # backwards compat
ENTRYPOINT ["docker-entrypoint.sh"]

RUN chmod g=u /etc/passwd

EXPOSE 5432
CMD ["postgres"]
5 changes: 5 additions & 0 deletions 9.3/alpine/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ if [ "${1:0:1}" = '-' ]; then
fi

# allow the container to be started with `--user`
if ! whoami &> /dev/null; then
if [ -w /etc/passwd ]; then
echo "${USER_NAME:-default}:x:$(id -u):0:${USER_NAME:-default} user:${HOME}:/sbin/nologin" >> /etc/passwd
fi
fi
if [ "$1" = 'postgres' ] && [ "$(id -u)" = '0' ]; then
mkdir -p "$PGDATA"
chown -R postgres "$PGDATA"
Expand Down
5 changes: 5 additions & 0 deletions 9.3/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ if [ "${1:0:1}" = '-' ]; then
fi

# allow the container to be started with `--user`
if ! whoami &> /dev/null; then
if [ -w /etc/passwd ]; then
echo "${USER_NAME:-default}:x:$(id -u):0:${USER_NAME:-default} user:${HOME}:/sbin/nologin" >> /etc/passwd
fi
fi
if [ "$1" = 'postgres' ] && [ "$(id -u)" = '0' ]; then
mkdir -p "$PGDATA"
chown -R postgres "$PGDATA"
Expand Down
2 changes: 2 additions & 0 deletions 9.4/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -130,5 +130,7 @@ COPY docker-entrypoint.sh /usr/local/bin/
RUN ln -s usr/local/bin/docker-entrypoint.sh / # backwards compat
ENTRYPOINT ["docker-entrypoint.sh"]

RUN chmod g=u /etc/passwd

EXPOSE 5432
CMD ["postgres"]
2 changes: 2 additions & 0 deletions 9.4/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -146,5 +146,7 @@ COPY docker-entrypoint.sh /usr/local/bin/
RUN ln -s usr/local/bin/docker-entrypoint.sh / # backwards compat
ENTRYPOINT ["docker-entrypoint.sh"]

RUN chmod g=u /etc/passwd

EXPOSE 5432
CMD ["postgres"]
5 changes: 5 additions & 0 deletions 9.4/alpine/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ if [ "${1:0:1}" = '-' ]; then
fi

# allow the container to be started with `--user`
if ! whoami &> /dev/null; then
if [ -w /etc/passwd ]; then
echo "${USER_NAME:-default}:x:$(id -u):0:${USER_NAME:-default} user:${HOME}:/sbin/nologin" >> /etc/passwd
fi
fi
if [ "$1" = 'postgres' ] && [ "$(id -u)" = '0' ]; then
mkdir -p "$PGDATA"
chown -R postgres "$PGDATA"
Expand Down
5 changes: 5 additions & 0 deletions 9.4/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ if [ "${1:0:1}" = '-' ]; then
fi

# allow the container to be started with `--user`
if ! whoami &> /dev/null; then
if [ -w /etc/passwd ]; then
echo "${USER_NAME:-default}:x:$(id -u):0:${USER_NAME:-default} user:${HOME}:/sbin/nologin" >> /etc/passwd
fi
fi
if [ "$1" = 'postgres' ] && [ "$(id -u)" = '0' ]; then
mkdir -p "$PGDATA"
chown -R postgres "$PGDATA"
Expand Down
2 changes: 2 additions & 0 deletions 9.5/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -130,5 +130,7 @@ COPY docker-entrypoint.sh /usr/local/bin/
RUN ln -s usr/local/bin/docker-entrypoint.sh / # backwards compat
ENTRYPOINT ["docker-entrypoint.sh"]

RUN chmod g=u /etc/passwd

EXPOSE 5432
CMD ["postgres"]
2 changes: 2 additions & 0 deletions 9.5/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -146,5 +146,7 @@ COPY docker-entrypoint.sh /usr/local/bin/
RUN ln -s usr/local/bin/docker-entrypoint.sh / # backwards compat
ENTRYPOINT ["docker-entrypoint.sh"]

RUN chmod g=u /etc/passwd

EXPOSE 5432
CMD ["postgres"]
5 changes: 5 additions & 0 deletions 9.5/alpine/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ if [ "${1:0:1}" = '-' ]; then
fi

# allow the container to be started with `--user`
if ! whoami &> /dev/null; then
if [ -w /etc/passwd ]; then
echo "${USER_NAME:-default}:x:$(id -u):0:${USER_NAME:-default} user:${HOME}:/sbin/nologin" >> /etc/passwd
fi
fi
if [ "$1" = 'postgres' ] && [ "$(id -u)" = '0' ]; then
mkdir -p "$PGDATA"
chown -R postgres "$PGDATA"
Expand Down
5 changes: 5 additions & 0 deletions 9.5/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ if [ "${1:0:1}" = '-' ]; then
fi

# allow the container to be started with `--user`
if ! whoami &> /dev/null; then
if [ -w /etc/passwd ]; then
echo "${USER_NAME:-default}:x:$(id -u):0:${USER_NAME:-default} user:${HOME}:/sbin/nologin" >> /etc/passwd
fi
fi
if [ "$1" = 'postgres' ] && [ "$(id -u)" = '0' ]; then
mkdir -p "$PGDATA"
chown -R postgres "$PGDATA"
Expand Down
2 changes: 2 additions & 0 deletions 9.6/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -130,5 +130,7 @@ COPY docker-entrypoint.sh /usr/local/bin/
RUN ln -s usr/local/bin/docker-entrypoint.sh / # backwards compat
ENTRYPOINT ["docker-entrypoint.sh"]

RUN chmod g=u /etc/passwd

EXPOSE 5432
CMD ["postgres"]
2 changes: 2 additions & 0 deletions 9.6/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -146,5 +146,7 @@ COPY docker-entrypoint.sh /usr/local/bin/
RUN ln -s usr/local/bin/docker-entrypoint.sh / # backwards compat
ENTRYPOINT ["docker-entrypoint.sh"]

RUN chmod g=u /etc/passwd

EXPOSE 5432
CMD ["postgres"]
5 changes: 5 additions & 0 deletions 9.6/alpine/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ if [ "${1:0:1}" = '-' ]; then
fi

# allow the container to be started with `--user`
if ! whoami &> /dev/null; then
if [ -w /etc/passwd ]; then
echo "${USER_NAME:-default}:x:$(id -u):0:${USER_NAME:-default} user:${HOME}:/sbin/nologin" >> /etc/passwd
fi
fi
if [ "$1" = 'postgres' ] && [ "$(id -u)" = '0' ]; then
mkdir -p "$PGDATA"
chown -R postgres "$PGDATA"
Expand Down
5 changes: 5 additions & 0 deletions 9.6/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ if [ "${1:0:1}" = '-' ]; then
fi

# allow the container to be started with `--user`
if ! whoami &> /dev/null; then
if [ -w /etc/passwd ]; then
echo "${USER_NAME:-default}:x:$(id -u):0:${USER_NAME:-default} user:${HOME}:/sbin/nologin" >> /etc/passwd
fi
fi
if [ "$1" = 'postgres' ] && [ "$(id -u)" = '0' ]; then
mkdir -p "$PGDATA"
chown -R postgres "$PGDATA"
Expand Down
5 changes: 5 additions & 0 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ if [ "${1:0:1}" = '-' ]; then
fi

# allow the container to be started with `--user`
if ! whoami &> /dev/null; then
if [ -w /etc/passwd ]; then
echo "${USER_NAME:-default}:x:$(id -u):0:${USER_NAME:-default} user:${HOME}:/sbin/nologin" >> /etc/passwd
fi
fi
if [ "$1" = 'postgres' ] && [ "$(id -u)" = '0' ]; then
mkdir -p "$PGDATA"
chown -R postgres "$PGDATA"
Expand Down