forked from vmware/vic
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile.bootstrap-linux
47 lines (39 loc) · 1.08 KB
/
Dockerfile.bootstrap-linux
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
FROM golang:1.6.0
RUN apt-get update && apt-get -y install \
curl \
cpio \
ssh-client \
squashfs-tools \
xorriso \
git \
gcc \
make \
vim \
patch \
rpm \
busybox-static \
isolinux \
syslinux
# Set the build id (which gets munged into motd) via the build flag
ARG BUILD_ID
ARG KERNEL_RPM
ARG TINYCORE
ARG TINYCORE_DEPS
ENV GOPATH /go
ENV VIC /go/src/github.com/vmware/vic
ENV DEBUG 1
COPY . $VIC
# Enable SSH debug
#RUN sed -i -e 's/const debugMux = false/const debugMux = true/' /go/src/golang.org/x/crypto/ssh/mux.go && sed -i -e 's/const debugHandshake = false/const debugHandshake = true/' /go/src/golang.org/x/crypto/ssh/handshake.go
# This expects vendor to be populated. We do this in the workspace in order to
# have some cache benefit.
RUN cd $VIC && make bootstrap
RUN cd $VIC/bootstrap && ./build-iso.sh \
-i /usr/lib/ISOLINUX/isolinux.bin \
-l /usr/lib/syslinux/modules/bios/ldlinux.c32 \
-k $KERNEL_RPM \
-c $TINYCORE \
-d "${TINYCORE_DEPS}" \
/tmp/bootstrap.iso
# To write the iso to a file, then echo it because Docker.
CMD ["cat", "/tmp/bootstrap.iso"]