github.com/emc-advanced-dev/unik@v0.0.0-20190717152701-a58d3e8e33b7/containers/compilers/osv/dynamic/Dockerfile (about) 1 FROM ubuntu:16.04 2 3 # Install prerequisites 4 RUN apt-get update -y 5 RUN apt-get install -y curl git qemu 6 7 # Install GO 8 RUN curl https://storage.googleapis.com/golang/go1.7.4.linux-amd64.tar.gz | tar xz -C /usr/local && \ 9 mv /usr/local/go /usr/local/go1.7 && \ 10 ln -s /usr/local/go1.7 /usr/local/go 11 ENV GOPATH=/go 12 ENV GOBIN=$GOPATH/bin 13 ENV PATH=$GOBIN:/usr/local/go/bin:$PATH 14 15 # Build Capstan from source (use mikelangelo-project fork that supports package management) 16 RUN go get github.com/mikelangelo-project/capstan && \ 17 go install github.com/mikelangelo-project/capstan 18 19 # Copy files needed by docker container 20 COPY docker_files/root /root 21 22 # Create mount point directory 23 RUN mkdir /project_directory 24 25 # Compose boot image and copy it to /project_directory (unik expects it there as a result) 26 CMD cd /project_directory && \ 27 capstan pull mike/osv-loader && \ 28 capstan package compose unik/dynamic-image --pull-missing --size $MAX_IMAGE_SIZE && \ 29 cp /root/.capstan/repository/unik/dynamic-image/dynamic-image.qemu /project_directory/boot.qcow2 30 31 # 32 # NOTES 33 # 34 # Build this container with: 35 # docker build -t projectunik/compilers-osv-dynamic:v0.0 . --no-cache 36 # 37 # Run this container with: 38 # docker run -ti --volume="$PWD:/project_directory" --env MAX_IMAGE_SIZE=500MB projectunik/compilers-osv-dynamic:v0.0 39 #