forked from code-golf/code-golf
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
27 lines (19 loc) · 825 Bytes
/
Dockerfile
File metadata and controls
27 lines (19 loc) · 825 Bytes
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
FROM debian:stretch-slim
ENV CGO_ENABLED=0 GOROOT_BOOTSTRAP=/usr/local/go
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates curl git make nasm
# https://golang.org/dl/
RUN curl -SSL https://dl.google.com/go/go1.11.2.linux-amd64.tar.gz \
| tar -xzC /usr/local
RUN git clone https://go.googlesource.com/go \
&& cd go \
&& git checkout ee55f08 \
&& cd src \
&& ./make.bash \
&& chmod +rx /root
ENV GOCACHE=/code-golf/.cache GOPATH=/root/go PATH=/go/bin:$PATH
COPY go.mod go.sum /
RUN go mod download && chmod -R o+w /root/go
CMD go build -ldflags -s \
&& nasm -f bin -o run-container run-container.asm \
&& chmod +x run-container