diff options
author | John R. Graham <john_r_graham@gentoo.org> | 2019-12-21 12:19:07 -0500 |
---|---|---|
committer | John R. Graham <john_r_graham@gentoo.org> | 2020-02-02 18:20:51 -0500 |
commit | b475c9df9b323eab1ad2c23d1bc0026b1de596da (patch) | |
tree | 7f4e451d0ca97a2a3f291df8ed8558e41bd4abba | |
parent | Added README-first and TODO list files. (diff) | |
download | forums-b475c9df.tar.gz forums-b475c9df.tar.bz2 forums-b475c9df.zip |
Incremental progress on initial deployment environment.
- Modified setup-workdir script to check out the
gentoo-docker-images repo.
- Moved the forums.Dockerfile into our repo.
Signed-off-by: John R. Graham <john_r_graham@gentoo.org>
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | TODO | 14 | ||||
-rw-r--r-- | misc/forums.Dockerfile | 30 | ||||
-rwxr-xr-x | setup-workdir.bash | 42 |
4 files changed, 75 insertions, 12 deletions
diff --git a/.gitignore b/.gitignore index 36afc36fd..71e0a966a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ style phpbb +gentoo-docker-images *~ @@ -1,7 +1,7 @@ -[ ] Get my Gentoo public key moved to Triton. -[ ] Get forums repository checked out on Triton. -[ ] Get forums.Dockerfile checked in to our repo. -[ ] Get container repository checked out in our hierarchy. Probably set up by the setup-workdir script. -[ ] Modify container to include nginx and play around until I have a working hello world web page. -[ ] Get a real certificate. Look at the certs on Ceres and try to re-discover what was done there. -[ ] Document the above. +[X] JRG: Get my Gentoo public key moved to Triton. +[X] JRG: Get forums repository checked out on Triton. +[ ] JRG: Get forums.Dockerfile checked in to our repo. +[X] JRG: Get container repository checked out in our hierarchy. Probably set up by the setup-workdir script. +[ ] JRG: Modify container to include nginx and play around until I have a working hello world web page. +[ ] JRG: Get a real certificate. Look at the certs on Ceres and try to re-discover what was done there. +[ ] JRG: Document the above. diff --git a/misc/forums.Dockerfile b/misc/forums.Dockerfile new file mode 100644 index 000000000..24ac52992 --- /dev/null +++ b/misc/forums.Dockerfile @@ -0,0 +1,30 @@ +# name the portage image +FROM gentoo/portage:latest as portage + +# image is based on stage3-amd64 +FROM gentoo/stage3-amd64:latest + +# copy the entire portage volume in +COPY --from=portage /var/db/repos/gentoo /var/db/repos/gentoo + +# continue with image build ... +RUN emerge -qv dev-lang/php +RUN emerge -qv www-servers/apache +RUN emerge -qv app-portage/gentoolkit +RUN emerge -qv dev-vcs/git +RUN emerge -qv app-editors/qemacs + +# FIXME: +# Outside the container, check out the release branch of the phpBB. +# Inside the container: +# COPY ${path_to_phpbb} /var/www/localhost/htdocs/ +# Outside the container, check out the release branch of the Gentoo-Subsilver style. +# Inside the container: +# COPY ${path_to_style}/Gentoo-SUBSILVER /var/www/localhost/htdocs/styles/Gentoo-SUBSILVER + +# Stopgap to prove it's working: +COPY index.html /var/www/localhost/htdocs/index.html +COPY startup.bash /root/startup.bash + +CMD ["/root/startup.bash"] + diff --git a/setup-workdir.bash b/setup-workdir.bash index 49608d5d9..03465060f 100755 --- a/setup-workdir.bash +++ b/setup-workdir.bash @@ -5,7 +5,7 @@ function setup_worktree() { branch="$2" if [[ -z "$branch" ]] ; then - echo "Error in call to setup_branch()." + echo "Error in call to setup_worktree()." exit 1 fi @@ -17,22 +17,54 @@ function setup_worktree() { echo "Adding worktree for ${directory} source from branch ${branch} ..." git worktree add ${directory} ${branch} - let worktree_count=worktree_count+1 + let setup_count=setup_count+1 + else + echo "Worktree for ${directory} already set up." + fi +} + +function setup_repo() { + repo="$1" + + directory=`basename ${repo}` + directory=${directory%%.git} + + if [[ -z "$directory" ]] ; then + echo "Error in call to setup_repo()." + exit 1 + fi + + if [[ ! -d "${directory}" ]] ; then + if [[ -e "${directory}" ]] ; then + echo "Error: Strange repository structure found for directory \"${directory}\". Cannot continue with the setup." + exit 1 + fi + + echo "Cloning repository ${repo} into ${directory} ..." + git clone ${repo} + if [[ ! -d "${directory}" ]] ; then + echo "Error: Clone did not result in expected directory \"${directory}\". Cannot continue with the setup." + exit 1 + fi + let setup_count=setup_count+1 + else + echo "Repo for ${directory} already set up." fi } # set -x set -e -worktree_count=0 +setup_count=0 setup_worktree phpbb origin/3.2.x setup_worktree style styles/Gentoo-SUBSILVER +setup_repo git@github.com:gentoo/gentoo-docker-images.git -if [[ $worktree_count -eq 0 ]] ; then +if [[ $setup_count -eq 0 ]] ; then echo "Working directory already set up." else - echo "Working directory setup complete." + echo "Working directory setup complete. ${setup_count} subdirectorues created." fi echo |