mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-26 20:26:13 +01:00
Merge pull request #3589 from yixingjia/noroot_notary
Run notary related images with user notary
This commit is contained in:
commit
01493508c1
@ -16,8 +16,6 @@ services:
|
||||
- harbor-notary
|
||||
volumes:
|
||||
- ./common/config/notary:/config
|
||||
entrypoint: /usr/bin/env sh
|
||||
command: -c "/migrations/migrate.sh && notary-server -config=/config/server-config.json -logf=logfmt"
|
||||
depends_on:
|
||||
- notary-db
|
||||
- notary-signer
|
||||
@ -39,8 +37,6 @@ services:
|
||||
- ./common/config/notary:/config
|
||||
env_file:
|
||||
- ./common/config/notary/signer_env
|
||||
entrypoint: /usr/bin/env sh
|
||||
command: -c "/migrations/migrate.sh && notary-signer -config=/config/signer-config.json -logf=logfmt"
|
||||
depends_on:
|
||||
- notary-db
|
||||
logging:
|
||||
|
3
make/photon/notary/server-start.sh
Normal file
3
make/photon/notary/server-start.sh
Normal file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
chown 10000:10000 -R /config
|
||||
sudo -E -u \#10000 sh -c "/usr/bin/env /migrations/migrate.sh && /bin/notary-server -config=/config/server-config.json -logf=logfmt"
|
@ -2,10 +2,15 @@ FROM vmware/photon:1.0
|
||||
|
||||
RUN tdnf distro-sync -y \
|
||||
&& tdnf erase vim -y \
|
||||
&& tdnf clean all
|
||||
&& tdnf install -y shadow sudo \
|
||||
&& tdnf clean all \
|
||||
&& groupadd -r -g 10000 notary \
|
||||
&& useradd --no-log-init -r -g 10000 -u 10000 notary
|
||||
|
||||
COPY ./binary/notary-server /bin/notary-server
|
||||
COPY ./migrate /bin/migrate
|
||||
COPY ./migrations/ /migrations/
|
||||
|
||||
COPY ./server-start.sh /bin/server-start.sh
|
||||
RUN chmod u+x /bin/notary-server /migrations/migrate.sh /bin/migrate /bin/server-start.sh
|
||||
ENV SERVICE_NAME=notary_server
|
||||
ENTRYPOINT [ "notary-server" ]
|
||||
ENTRYPOINT [ "/bin/server-start.sh" ]
|
||||
|
3
make/photon/notary/signer-start.sh
Normal file
3
make/photon/notary/signer-start.sh
Normal file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
chown 10000:10000 -R /config
|
||||
sudo -E -u \#10000 sh -c "/usr/bin/env && /migrations/migrate.sh && /bin/notary-signer -config=/config/signer-config.json -logf=logfmt"
|
@ -2,10 +2,15 @@ FROM vmware/photon:1.0
|
||||
|
||||
RUN tdnf distro-sync -y \
|
||||
&& tdnf erase vim -y \
|
||||
&& tdnf clean all
|
||||
&& tdnf install -y shadow sudo \
|
||||
&& tdnf clean all \
|
||||
&& groupadd -r -g 10000 notary \
|
||||
&& useradd --no-log-init -r -g 10000 -u 10000 notary
|
||||
COPY ./binary/notary-signer /bin/notary-signer
|
||||
COPY ./migrate /bin/migrate
|
||||
COPY ./migrations/ /migrations/
|
||||
COPY ./signer-start.sh /bin/signer-start.sh
|
||||
|
||||
RUN chmod u+x /bin/notary-signer /migrations/migrate.sh /bin/migrate /bin/signer-start.sh
|
||||
ENV SERVICE_NAME=notary_signer
|
||||
ENTRYPOINT [ "notary-signer" ]
|
||||
ENTRYPOINT [ "/bin/signer-start.sh" ]
|
||||
|
Loading…
Reference in New Issue
Block a user