-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pga-create docker image #114
pga-create docker image #114
Conversation
#===================================================== | ||
FROM alpine:3.9.2 | ||
|
||
# COPY --from=builder /bin/borges* /bin/pga-create /bin/*-repos /usr/local/bin/dumb-init /bin/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
leftover?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indeed
Signed-off-by: Manuel Carmona <manu.carmona90@gmail.com>
…r image Signed-off-by: Manuel Carmona <manu.carmona90@gmail.com>
77ef985
to
8df69e6
Compare
RUN go build -tags norwfs -o /bin/pga-create ${PGA_CREATE_PATH}/cmd/pga-create | ||
|
||
# select-repos command | ||
RUN echo -e '#!/bin/sh \n\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can extract these two scripts to files in the repository to make them easier to read ad modify.
Also, instead of using &&
to continue only when the previous command is successful you can enable exiting the shell on error with:
set -e
… repository to be copied into the docker image Signed-off-by: Manuel Carmona <manu.carmona90@gmail.com>
8e3eb64
to
95632e4
Compare
This PR add two things:
.travis.yml
to do a push of the pga-create docker imageHow pga-create image works
The pga-create image will generate the list of repositories to be included in the PGA and the index in two separated steps through two different commands:
select-repos
andindex-repos
. The download of the repositories is done in other step using borges.Step 1: select-repos
select repos
needs a volume mounted on/pga/data
. This step will leave the processed data necessary in that volume.$ docker run --rm --name pga-create_1 \ -v /home/manu/pga-docker/data:/pga/data \ -e "STARS=1000" \ pga-create:test select-repos
The environment variable
STARS
configures the number of stars to filter repositories that will be included in the PGA list.Under the mounted volume, the data needed for the next steps is placed in:
Step 2: borges
Using borges and the generated list in the previous step
/home/manu/pga-docker/data/pga.list
download the repositories. It's important that the bucket-size here and in the next step are the same.Step 3: index-repos
To generate the pga-index:
It's important to note two things:
"BUCKET_SIZE=2"
should be the same used by borges and-v /home/manu/pga-docker/root-repositories:/pga/root-repositories
it's where we have the repositories downloaded by borges.After this step we will have two sets of data under the mounted volumes:
So under
XXX/root-repositories
is left all the data (siva-files and the index.tar.gz) needed by the web server.The addition of the docker-hub credentials and the creation of the
srcd/pga-create
on docker-hub is still pending until this is merged, I'll do it then.