ADD file:2f903ddbaeb0adcaed73557189e79bc69eed3da162bf7efc882d056dba5979d9 in / |
LABEL name=Photon OS aarch64/4.0 Base Image vendor=VMware build-date=20220520 |
CMD ["/bin/bash"] |
ENV PGDATA=/var/lib/postgresql/data |
RUN /bin/sh -c tdnf install -y shadow gzip postgresql13 findutils bc >> /dev/null && groupadd -r postgres --gid=999 && useradd -m -r -g postgres --uid=999 postgres && mkdir -p /docker-entrypoint-initdb.d && mkdir -p /run/postgresql && chown -R postgres:postgres /run/postgresql && chmod 2777 /run/postgresql && mkdir -p "$PGDATA" && chown -R postgres:postgres "$PGDATA" && chmod 777 "$PGDATA" && sed -i "s|#listen_addresses = 'localhost'.*|listen_addresses = '*'|g" /usr/pgsql/13/share/postgresql.conf.sample && sed -i "s|#unix_socket_directories = '/tmp'.*|unix_socket_directories = '/run/postgresql'|g" /usr/pgsql/13/share/postgresql.conf.sample && ln -s /usr/pgsql/13/bin/* /usr/bin/ && tdnf clean all # buildkit |
RUN /bin/sh -c tdnf erase -y toybox && tdnf install -y util-linux net-tools # buildkit |
VOLUME [/var/lib/postgresql/data] |
COPY ./make/photon/db/docker-entrypoint.sh /docker-entrypoint.sh # buildkit |
COPY ./make/photon/db/initdb.sh /initdb.sh # buildkit |
COPY ./make/photon/db/upgrade.sh /upgrade.sh # buildkit |
COPY ./make/photon/db/docker-healthcheck.sh /docker-healthcheck.sh # buildkit |
COPY ./make/photon/db/initial-notaryserver.sql /docker-entrypoint-initdb.d/ # buildkit |
COPY ./make/photon/db/initial-notarysigner.sql /docker-entrypoint-initdb.d/ # buildkit |
COPY ./make/photon/db/initial-registry.sql /docker-entrypoint-initdb.d/ # buildkit |
RUN /bin/sh -c chown -R postgres:postgres /docker-entrypoint.sh /docker-healthcheck.sh /docker-entrypoint-initdb.d && chmod u+x /docker-entrypoint.sh /docker-healthcheck.sh # buildkit |
ENTRYPOINT ["/docker-entrypoint.sh" "" "13"] |
HEALTHCHECK &{["CMD" "/docker-healthcheck.sh"] "0s" "0s" "0s" '\x00'} |
USER postgres |