From 644af150c029f0bd5a52cd18338a785dc0e524a0 Mon Sep 17 00:00:00 2001 From: Scott Alfter Date: Tue, 26 Nov 2024 11:37:15 -0800 Subject: [PATCH] initial commit --- .gitignore | 2 ++ Dockerfile | 17 +++++++++++++++++ README.md | 12 ++++++++++++ docker-compose.yml | 5 +++++ ssh-keys/.keepdir | 0 5 files changed, 36 insertions(+) create mode 100644 .gitignore create mode 100644 Dockerfile create mode 100644 README.md create mode 100644 docker-compose.yml create mode 100644 ssh-keys/.keepdir diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..845a537 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*~ +id_* diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..4dfef35 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +FROM gentoo/portage AS portage +FROM gentoo/stage3 +COPY --from=portage /var/db/repos/gentoo /var/db/repos/gentoo +COPY --chown=root:root ssh-keys/* /root/.ssh/ +RUN emerge eselect-repository dev-vcs/git joe && eselect repository enable salfter && emaint sync -r salfter && sed -i "s/\/bin\/nano/\/usr\/bin\/joe/" /etc/profile +WORKDIR /var/db/repos/salfter +RUN ssh -o "StrictHostKeyChecking no" -p 222 git@gitlab.alfter.us && git remote rm origin && git remote add origin ssh://git@gitlab.alfter.us:222/salfter/portage && git pull origin master --rebase || true +RUN git branch --set-upstream-to=origin master && git rebase --skip && git pull && git remote add gitlab ssh://gitlab.com/salfter/portage +CMD [ "tail", "-f", "/dev/null" ] + +# 12 git remote rm origin +# 13 git remote add origin ssh://git@gitlab.alfter.us:222/salfter/portage +# 14 git pull origin master +# 15 git pull origin master --rebase +# 16 git rebase --skip +# 17 git pull +# 18 git branch --set-upstream-to=origin master diff --git a/README.md b/README.md new file mode 100644 index 0000000..d186198 --- /dev/null +++ b/README.md @@ -0,0 +1,12 @@ +Portage Overlay Maintenance +=========================== + +This container allows for easy maintenance of a Portage overlay on a +non-Gentoo system. It sets up a Gentoo container, pulls in an overlay, and +adds a few tools to facilitate maintenance. It's set up to work with my +overlay, but editing the Dockerfile should allow you to work with any +overlay you want. + +Copy the SSH keys you need to access your Git repo into the ssh-keys +directory, then set it up with ```docker compose up -d```. Enter the +running container with ``docker exec -it gentoo bash -l```. diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..e869295 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,5 @@ +services: + gentoo: + build: . + image: salfter/gentoo + container_name: gentoo diff --git a/ssh-keys/.keepdir b/ssh-keys/.keepdir new file mode 100644 index 0000000..e69de29