Containerfile 1.08 KB
Newer Older
1
2
3
ARG STAGE0_TAG
FROM nest/stage0:${STAGE0_TAG}

James T. Lee's avatar
James T. Lee committed
4
ARG FACTER_build=stage1
5
ARG FACTER_emerge_default_opts
James T. Lee's avatar
James T. Lee committed
6
ARG FACTER_makeopts
7
ARG PROFILE
James T. Lee's avatar
James T. Lee committed
8

9
10
11
12
13
RUN eix-sync -q

# Configure locales and set up some conveniences
RUN puppet agent --test --certname ci --environment main --tags nest::base::distcc,nest::base::locale,nest::base::portage,nest::base::puppet --logdir /var/log/puppet --rundir /var/run/puppet --vardir /var/lib/puppet --runtimeout 0; [ $? -eq 2 ]

James T. Lee's avatar
James T. Lee committed
14
15
16
17
# Locale is managed by Puppet, but
# it also needs to be persisted in the image.
ENV LANG=en_US.UTF-8

18
RUN ACCEPT_KEYWORDS='* ~*' emerge -v1 -j1 dev-libs/libffi dev-lang/ghc
James T. Lee's avatar
James T. Lee committed
19

20
21
# Switch to desired profile and make the base system consistent with it,
# breaking out of a possible circular dependency between mesa and libva.
22
23
RUN eselect profile set "nest:${PROFILE}"
RUN emerge --info
24
RUN USE='-vaapi' emerge -v --update --deep --newuse --with-bdeps=y @world
25
RUN emerge -v --update --deep --newuse --with-bdeps=y @world
26
27
RUN emerge --depclean

28
# Configure the stage
James T. Lee's avatar
James T. Lee committed
29
RUN puppet agent --test --runtimeout 0; [ $? -eq 2 ]
30

31
RUN rm -rf /var/db/repos
32
33

CMD ["/bin/zsh"]