Merge pull request #13823 from reasonerjt/inst-cert-home-dir

Replace tilde in install_cert.sh
This commit is contained in:
Wenkai Yin(尹文开) 2020-12-25 10:25:51 +08:00 committed by GitHub
commit 19ad8ad68d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 9 deletions

View File

@ -7,11 +7,13 @@ if ! grep -q "Photon" /etc/lsb-release; then
exit 0
fi
if [ ! -f ~/ca-bundle.crt.original ]; then
cp /etc/pki/tls/certs/ca-bundle.crt ~/ca-bundle.crt.original
ORIGINAL_LOCATION=$(dirname "$0")
if [ ! -f $ORIGINAL_LOCATION/ca-bundle.crt.original ]; then
cp /etc/pki/tls/certs/ca-bundle.crt $ORIGINAL_LOCATION/ca-bundle.crt.original
fi
cp ~/ca-bundle.crt.original /etc/pki/tls/certs/ca-bundle.crt
cp $ORIGINAL_LOCATION/ca-bundle.crt.original /etc/pki/tls/certs/ca-bundle.crt
# Install /etc/harbor/ssl/{component}/ca.crt to trust CA.
echo "Appending internal tls trust CA to ca-bundle ..."

View File

@ -11,9 +11,10 @@ COPY ./make/migrations /harbor/migrations
COPY ./icons /harbor/icons
RUN chown -R harbor:harbor /etc/pki/tls/certs \
&& chown harbor:harbor /harbor/entrypoint.sh && chmod u+x /harbor/entrypoint.sh \
&& chown harbor:harbor /harbor/install_cert.sh && chmod u+x /harbor/install_cert.sh \
&& chown harbor:harbor /harbor/harbor_core && chmod u+x /harbor/harbor_core
&& chown -R harbor:harbor /harbor/ \
&& chmod u+x /harbor/entrypoint.sh \
&& chmod u+x /harbor/install_cert.sh \
&& chmod u+x /harbor/harbor_core
WORKDIR /harbor/
USER harbor

View File

@ -8,9 +8,10 @@ COPY ./make/photon/jobservice/harbor_jobservice /harbor/
RUN chown -R harbor:harbor /etc/pki/tls/certs \
&& chown harbor:harbor /harbor/entrypoint.sh && chmod u+x /harbor/entrypoint.sh \
&& chown harbor:harbor /harbor/install_cert.sh && chmod u+x /harbor/install_cert.sh \
&& chown harbor:harbor /harbor/harbor_jobservice && chmod u+x /harbor/harbor_jobservice
&& chown -R harbor:harbor /harbor/ \
&& chmod u+x /harbor/entrypoint.sh \
&& chmod u+x /harbor/install_cert.sh \
&& chmod u+x /harbor/harbor_jobservice
WORKDIR /harbor/