mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-28 05:05:19 +01:00
4a12623459
The initdb.sh and the upgrade.sh scripts in the postgres image were not owned by the postgres user, which made them failing with permission denied errors. Signed-off-by: Mate Hajnal <hajnalmt@gmail.com>
20 lines
784 B
Docker
20 lines
784 B
Docker
ARG harbor_base_image_version
|
|
ARG harbor_base_namespace
|
|
FROM ${harbor_base_namespace}/harbor-db-base:${harbor_base_image_version}
|
|
|
|
VOLUME /var/lib/postgresql/data
|
|
|
|
COPY ./make/photon/db/docker-entrypoint.sh /docker-entrypoint.sh
|
|
COPY ./make/photon/db/initdb.sh /initdb.sh
|
|
COPY ./make/photon/db/upgrade.sh /upgrade.sh
|
|
COPY ./make/photon/db/docker-healthcheck.sh /docker-healthcheck.sh
|
|
COPY ./make/photon/db/initial-registry.sql /docker-entrypoint-initdb.d/
|
|
RUN chown -R postgres:postgres /docker-entrypoint.sh /initdb.sh /upgrade.sh \
|
|
/docker-healthcheck.sh /docker-entrypoint-initdb.d \
|
|
&& chmod u+x /initdb.sh /upgrade.sh /docker-entrypoint.sh /docker-healthcheck.sh
|
|
|
|
ENTRYPOINT ["/docker-entrypoint.sh", "14", "15"]
|
|
HEALTHCHECK CMD ["/docker-healthcheck.sh"]
|
|
|
|
USER postgres
|