harbor/make/photon/standalone-db-migrator/Dockerfile
Daniel Jiang 4f94f59d2a Provide a standalone migrator to migrate DB schema.
Fixes #11885
This part will not by default be packaged into release.
A README.md will be added in another commit.

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2020-08-06 18:57:55 +08:00

18 lines
527 B
Docker

ARG harbor_base_image_version
ARG harbor_base_namespace
FROM ${harbor_base_namespace}/harbor-db-base:${harbor_base_image_version}
ENV EXTERNAL_DB 0
RUN mkdir /harbor/
COPY ./make/migrations /migrations
COPY ./make/photon/standalone-db-migrator/migrate /harbor/
COPY ./make/photon/standalone-db-migrator/entrypoint.sh /harbor/
RUN chown -R postgres:postgres /harbor/ \
&& chown -R postgres:postgres /migrations/ \
&& chmod u+x /harbor/migrate /harbor/entrypoint.sh
USER postgres
ENTRYPOINT ["/harbor/entrypoint.sh"]