With the stage3 from
20150402 the directory already exists:
# cat /etc/portage/package.use/iputils
net-misc/iputils -caps -filecaps
I don't know how reliable that's going to be though, so I'm not
dropping the mkdir call entirely.
Dockerfile.templates that used to write to an /etc/portage/package.use
file now write to a package-specific file inside the package.use
directory (which is better practice anyway).
#VOLUME ["${PORTAGE}:/usr/portage:ro", "${PORTAGE}/distfiles:/usr/portage/distfiles:rw"]
RUN mkdir /etc/portage/package.accept_keywords
-RUN mkdir /etc/portage/package.use
+RUN mkdir -p /etc/portage/package.use
# avoid a Python 2 dependency
RUN echo 'dev-vcs/git -python' >> /etc/portage/package.use/layman
RUN echo 'app-portage/layman ~amd64' >> /etc/portage/package.accept_keywords/layman
FROM ${NAMESPACE}/gentoo-syslog:${TAG}
MAINTAINER ${MAINTAINER}
#VOLUME ["${PORTAGE}:/usr/portage:ro", "${PORTAGE}/distfiles:/usr/portage/distfiles:rw"]
-RUN echo 'media-libs/gd jpeg png' >> /etc/portage/package.use
-RUN echo 'net-analyzer/nagios-core lighttpd' >> /etc/portage/package.use
-RUN echo 'net-analyzer/nagios-plugins nagios-dns nagios-ntp nagios-ssh' >> /etc/portage/package.use
-RUN echo 'dev-lang/php cgi' >> /etc/portage/package.use
+RUN mkdir -p /etc/portage/package.use
+RUN echo 'media-libs/gd jpeg png' >> /etc/portage/package.use/nagios
+RUN echo 'net-analyzer/nagios-core lighttpd' >> /etc/portage/package.use/nagios
+RUN echo 'net-analyzer/nagios-plugins nagios-dns nagios-ntp nagios-ssh' >> /etc/portage/package.use/nagios
+RUN echo 'dev-lang/php cgi' >> /etc/portage/package.use/nagios
RUN emerge -v net-analyzer/nagios
RUN eselect news read new
ADD lighttpd-syslog.conf /etc/lighttpd/syslog.conf
FROM ${NAMESPACE}/gentoo-syslog:${TAG}
MAINTAINER ${MAINTAINER}
#VOLUME ["${PORTAGE}:/usr/portage:ro", "${PORTAGE}/distfiles:/usr/portage/distfiles:rw"]
+RUN mkdir -p /etc/portage/package.use
RUN echo 'net-irc/ngircd ~amd64' >> /etc/portage/package.accept_keywords
-RUN echo 'net-irc/ngircd -pam' >> /etc/portage/package.use
+RUN echo 'net-irc/ngircd -pam' >> /etc/portage/package.use/ngircd
RUN emerge -v net-irc/ngircd
RUN eselect news read new
RUN rc-update add ngircd default
RUN eselect python set $(eselect python show --python2)
RUN mkdir /etc/portage/package.accept_keywords
-RUN mkdir /etc/portage/package.use
+RUN mkdir -p /etc/portage/package.use
RUN echo 'app-admin/salt git' >> /etc/portage/package.use/salt
ADD package.accept_keywords /etc/portage/package.accept_keywords/salt