-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
48 lines (35 loc) · 1.35 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Get the latest portage image as a build step.
FROM gentoo/portage:latest as portage
# Build the distro from the stage3 tarball.
FROM gentoo/stage3-amd64:latest
# Copy in the portage volume.
COPY --from=portage /var/db/repos/gentoo /var/db/repos/gentoo
# Copy in our portage files.
COPY etc/portage /etc/portage
# Set up the make.profile symlink.
RUN cd /etc/portage \
&& ln -snf ../../var/db/repos/gentoo/profiles/default/linux/amd64/17.1/systemd make.profile
# Remove the SELinux profiles.
RUN find /var/db/repos/gentoo/profiles/ -iname "selinux" | xargs rm -rf \
&& grep -v selinux /var/db/repos/gentoo/profiles/profiles.desc > /tmp/thing \
&& mv /tmp/thing /var/db/repos/gentoo/profiles/profiles.desc
# Update the world for the new profile.
RUN emerge --update --newuse --deep --complete-graph @world \
&& emerge -v --depclean
# Install repoman.
RUN emerge -qv \
app-editors/vim \
app-eselect/eselect-repository \
app-portage/gentoolkit \
app-portage/metagen \
app-portage/repoman \
dev-vcs/git
# Enable the repos.
RUN eselect repository enable {gentoo,jessfraz-overlay}
ENV EDITOR vim
RUN echo "repoman manifest" > ~/.bash_history \
&& echo "repoman -dx full" >> ~/.bash_history \
&& echo "metagen -e jessos@jessfraz.com --type person -o metadata.xml" >> ~/.bash_history
# Copy in our files.
COPY . /var/db/repos/jessfraz
WORKDIR /var/db/repos/jessfraz