Skip to content

WIP: Use docker hub auto build#36

Open
dneise wants to merge 8 commits intodevelopfrom
use_docker_hub_auto_build
Open

WIP: Use docker hub auto build#36
dneise wants to merge 8 commits intodevelopfrom
use_docker_hub_auto_build

Conversation

@dneise
Copy link
Copy Markdown
Member

@dneise dneise commented Oct 27, 2020

I tested how what is needed for us to use the Docker Hub Automated Builds Feature.
These were the "sub-issues" I ran into:

  • On DockerHub Configure Automated Builds I (dneise) cannot select the ACS-Docker-Image repository, which is owned by ACS-Community.
    So for the moment, I simply forked our repo to my personal account and played with that.
    I assume @tstaig can do it. So for now its fine .. and once we like it .. Thomas can just do it.

  • The VM they (docker-hub) use for building the images does not have git-lfs installed at the time they do the git clone.
    So I had to fall back to a hook. I simply chose the hooks/post_checkout for this.
    So, we have no real advantage of using a sub-module anymore. So I replaced it with a little git_clone_acs.sh script.

  • In order for us, to make advancing to a new version of ACS as easy as possible, I've introduced a little text file called VERSION. If we are lucky and nothing in the build changes between two versions of ACS .. we only modify that file and are done.

@dneise dneise changed the title Use docker hub auto build WIP: Use docker hub auto build Oct 27, 2020
@dneise dneise changed the base branch from master to develop October 27, 2020 16:26
@dneise
Copy link
Copy Markdown
Member Author

dneise commented Oct 27, 2020

@dneise dneise force-pushed the use_docker_hub_auto_build branch from afab31c to db96c10 Compare October 27, 2020 18:05
@dneise dneise requested a review from emiliogq October 28, 2020 06:42
Copy link
Copy Markdown
Contributor

@emiliogq emiliogq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cannot agree with this PR, I don't see the point of having many scripts outside the Dockefile.

If the git-lfs is not installed, as far I understood, with a hook you could install it before downloading the repository and everything is still working, right?

Like this, but:

yum install -y git-lfs
# OR
apt-get install -y git-lfs

git submodule update --init --recursive

@dneise
Copy link
Copy Markdown
Member Author

dneise commented Oct 29, 2020

I did not manage to get a hook before the first git clone step. So if docker-hub tries to checkout our repo .. and our repo contains git-fls objects .. it fails at that point.

The first time I was able to get a hook was post_checkout.
But this is the first time I am playing with this .. maybe other ways are possible.

@dneise
Copy link
Copy Markdown
Member Author

dneise commented Oct 30, 2020

So ... regarding your comment here.

I cannot agree with this PR, I don't see the point of having many scripts outside the Dockefile.

I think I explained the reasons for going the way I went in this PR.
Maybe there are other and better ways, but I was unable to find them.

What you proposed, installing git-lfs via yum did not work.
What I propose here, does work.

I think in engineering, when one path works .. and the other path does not work ... well there might not be too much to discuss.
Also ... nothing is carved in stone. If someone finds a better solution, we can always change it later.

Comment thread Dockerfile
# Prepare Java
mkdir -pv /usr/java && \
ln -sv /usr/lib/jvm/java-openjdk $JAVA_HOME && \
echo "source $ACS_ROOT/ACSSW/config/.acs/.bash_profile.acs" >> /etc/bashrc
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this removal related to #37 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants