-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile
58 lines (48 loc) · 1.37 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
49
50
51
52
53
54
55
56
57
58
#
# Copyright (C) 2017 XLAB, Ltd.
# Copyright (C) 2018 Waldemar Kozaczuk
#
# This work is open source software, licensed under the terms of the
# BSD license as described in the LICENSE file in the top-level directory.
#
# This Docker file defines a container intended to demonstrate running
# applications on OSv unikernel
#
FROM ubuntu:18.10
ENV DEBIAN_FRONTEND noninteractive
ENV TERM=linux
COPY ./etc/keyboard /etc/default/keyboard
COPY ./etc/console-setup /etc/default/console-setup
RUN apt-get update -y && apt-get install -y \
curl \
qemu-system-x86 \
qemu-utils \
git \
wget && apt-get autoremove && apt-get clean
#
# PREPARE ENVIRONMENT
#
# - build Mikelangelo Capstan
RUN cd /tmp && wget https://dl.google.com/go/go1.11.linux-amd64.tar.gz
RUN cd /tmp && tar -xf go1.11.linux-amd64.tar.gz && mv go /usr/local && mkdir $HOME/go
ENV GOROOT=/usr/local/go
ENV GOPATH=$HOME/go
ENV PATH=$GOPATH/bin:$GOROOT/bin:$PATH
RUN go get github.com/mikelangelo-project/capstan
RUN cd $GOPATH/src/github.com/mikelangelo-project/capstan && go build .
# Copy capstan apps
WORKDIR /capstan-apps
COPY ./apps/ /capstan-apps/
# Download latest OSv kernel and packages
RUN mkdir /scripts
COPY ./scripts/* /scripts/
RUN /scripts/download_packages.sh all
CMD /bin/bash
#
# NOTES
#
# Build this container with:
# docker build -t osv/runner .
#
# Run this container with:
# docker run -it --privileged osv/runner