-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
47 lines (35 loc) · 1.79 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
#------------------------------------------------------------------------------
# Set the base image for subsequent instructions:
#------------------------------------------------------------------------------
FROM gentoo/stage3-amd64
MAINTAINER Marc Villacorta Morera <[email protected]>
#------------------------------------------------------------------------------
# Build mesos:
#------------------------------------------------------------------------------
ENV VERSION="1.3.1"
COPY rootfs /
RUN emerge-webrsync -q \
&& cd /usr/local/portage/sys-cluster/mesos \
&& mv mesos.ebuild mesos-${VERSION/-/_}.ebuild \
&& ebuild mesos-${VERSION/-/_}.ebuild digest
RUN emerge -q --onlydeps sys-cluster/mesos
RUN emerge -q sys-cluster/mesos
#------------------------------------------------------------------------------
# Isolate mesos in /opt:
#------------------------------------------------------------------------------
RUN find /opt -name *.sh -delete -o -name *.la -delete \
&& rm -rf /opt/{include,etc,icedtea-*,.keep} /opt/lib/pkgconfig \
&& isolate-mesos
#------------------------------------------------------------------------------
# Pre-squash cleanup:
#------------------------------------------------------------------------------
RUN wget https://busybox.net/downloads/binaries/1.26.2-defconfig-multiarch/busybox-x86_64 -qO /busybox \
&& chmod +x /busybox && busybox rm -rf var/ usr/ tmp/ sbin/ root/ mnt/ \
lib* media/ home/ boot/ run/ /etc bin/* &> /dev/null; \
/busybox ln -s /busybox /bin/sh \
&& /busybox ln -s /busybox /bin/ls \
&& /busybox ln -s /busybox /bin/cp
#------------------------------------------------------------------------------
# Command:
#------------------------------------------------------------------------------
CMD ["/bin/sh"]