-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
41 changed files
with
282 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/usr/bin/env bash | ||
|
||
DOCKERCMD=docker | ||
CICDHOST=cicd.harbor.bitsf.xin | ||
DOCKERFILEPATH=make/photon | ||
|
||
${DOCKERCMD} login ${CICDHOST} || exit 2 | ||
for name in chartserver clair core db jobservice log nginx portal prepare redis registry registryctl; do | ||
echo building $name base docker image | ||
$DOCKERCMD build -f $DOCKERFILEPATH/$name/Dockerfile-base -t $CICDHOST/harbor-depend/$name:base . && \ | ||
$DOCKERCMD push $CICDHOST/harbor-depend/$name:base | ||
if [ "$?" != "0" ]; then exit 1; fi | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
FROM photon:2.0 | ||
|
||
RUN tdnf install -y shadow sudo >>/dev/null\ | ||
&& tdnf clean all \ | ||
&& mkdir /chartserver/ \ | ||
&& mkdir /harbor/ \ | ||
&& groupadd -r -g 10000 chartuser \ | ||
&& useradd --no-log-init -m -r -g 10000 -u 10000 chartuser |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
FROM photon:2.0 | ||
|
||
RUN tdnf install -y git shadow sudo rpm xz python-xml >>/dev/null\ | ||
&& tdnf clean all \ | ||
&& mkdir /clair/ \ | ||
&& mkdir /harbor \ | ||
&& groupadd -r -g 10000 clair \ | ||
&& useradd --no-log-init -m -r -g 10000 -u 10000 clair |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM photon:2.0 | ||
|
||
RUN tdnf install sudo tzdata -y >> /dev/null\ | ||
&& tdnf clean all \ | ||
&& groupadd -r -g 10000 harbor && useradd --no-log-init -r -g 10000 -u 10000 harbor \ | ||
&& mkdir /harbor/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
FROM photon:2.0 | ||
|
||
ENV PGDATA /var/lib/postgresql/data | ||
|
||
RUN tdnf install -y shadow gzip postgresql >> /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/share/postgresql/postgresql.conf.sample \ | ||
&& sed -i "s|#unix_socket_directories = '/tmp'.*|unix_socket_directories = '/run/postgresql'|g" /usr/share/postgresql/postgresql.conf.sample \ | ||
&& tdnf clean all | ||
|
||
RUN tdnf erase -y toybox && tdnf install -y util-linux net-tools | ||
|
||
VOLUME /var/lib/postgresql/data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
FROM photon:2.0 | ||
|
||
RUN tdnf install sudo tzdata -y >> /dev/null\ | ||
&& tdnf clean all \ | ||
&& groupadd -r -g 10000 harbor && useradd --no-log-init -r -g 10000 -u 10000 harbor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM photon:2.0 | ||
|
||
RUN tdnf install -y cronie rsyslog logrotate shadow tar gzip sudo >> /dev/null\ | ||
&& mkdir /var/spool/rsyslog \ | ||
&& groupadd -r -g 10000 syslog && useradd --no-log-init -r -g 10000 -u 10000 syslog \ | ||
&& tdnf clean all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
FROM photon:2.0 | ||
|
||
RUN tdnf install sudo nginx -y >> /dev/null\ | ||
&& tdnf clean all \ | ||
&& groupadd -r -g 10000 nginx && useradd --no-log-init -r -g 10000 -u 10000 nginx \ | ||
&& ln -sf /dev/stdout /var/log/nginx/access.log \ | ||
&& ln -sf /dev/stderr /var/log/nginx/error.log | ||
|
||
VOLUME /var/cache/nginx /var/log/nginx /run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
FROM photon:2.0 | ||
|
||
RUN tdnf install -y nginx sudo >> /dev/null \ | ||
&& ln -sf /dev/stdout /var/log/nginx/access.log \ | ||
&& ln -sf /dev/stderr /var/log/nginx/error.log \ | ||
&& groupadd -r -g 10000 nginx && useradd --no-log-init -r -g 10000 -u 10000 nginx \ | ||
&& chown -R nginx:nginx /etc/nginx \ | ||
&& tdnf clean all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,16 @@ | ||
FROM photon:2.0 | ||
FROM cicd.harbor.bitsf.xin/harbor-depend/prepare:base | ||
|
||
ENV LANG en_US.UTF-8 | ||
|
||
WORKDIR /usr/src/app | ||
|
||
RUN mkdir -p /harbor_make | ||
|
||
RUN tdnf install -y python3 \ | ||
&& tdnf install -y python3-pip | ||
RUN pip3 install pipenv==2018.11.26 | ||
|
||
COPY make/photon/prepare /usr/src/app | ||
RUN set -ex && pipenv install --deploy --system | ||
|
||
ENTRYPOINT [ "python3", "main.py" ] | ||
|
||
VOLUME ["/harbor_make"] | ||
VOLUME ["/harbor_make"] | ||
|
||
COPY make/harbor.yml /input/harbor.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
FROM photon:2.0 | ||
|
||
ENV LANG en_US.UTF-8 | ||
|
||
RUN tdnf install -y python3 \ | ||
&& tdnf install -y python3-pip | ||
RUN pip3 install pipenv==2018.11.26 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
FROM photon:2.0 | ||
|
||
RUN tdnf install -y redis sudo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
FROM photon:2.0 | ||
|
||
# The original script in the docker offical registry image. | ||
RUN tdnf install sudo -y >> /dev/null\ | ||
&& tdnf clean all \ | ||
&& mkdir /harbor/ \ | ||
&& mkdir -p /etc/registry \ | ||
&& groupadd -r -g 10000 harbor && useradd --no-log-init -r -g 10000 -u 10000 harbor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
FROM photon:2.0 | ||
|
||
RUN tdnf install sudo -y >> /dev/null \ | ||
&& tdnf clean all \ | ||
&& groupadd -r -g 10000 harbor && useradd --no-log-init -r -g 10000 -u 10000 harbor \ | ||
&& mkdir -p /etc/registry \ | ||
&& mkdir /harbor/ |
Oops, something went wrong.