Add Dockerfile

This commit is contained in:
Johan Brandhorst
2018-10-20 23:56:37 +01:00
parent 3d644e6ea8
commit 97caabb8c2
4 changed files with 53 additions and 4 deletions
+23
View File
@@ -0,0 +1,23 @@
FROM golang:latest
RUN wget -O- https://apt.llvm.org/llvm-snapshot.gpg.key| apt-key add - && \
echo "deb http://apt.llvm.org/stretch/ llvm-toolchain-stretch-7 main" >> /etc/apt/sources.list && \
apt-get update && \
apt-get install -y llvm-7-dev
RUN wget -O- https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
COPY . /go/src/github.com/aykevl/tinygo
RUN go install /go/src/github.com/aykevl/tinygo/
FROM golang:latest
COPY --from=0 /go/bin/tinygo /go/bin/tinygo
RUN wget -O- https://apt.llvm.org/llvm-snapshot.gpg.key| apt-key add - && \
echo "deb http://apt.llvm.org/stretch/ llvm-toolchain-stretch-7 main" >> /etc/apt/sources.list && \
apt-get update && \
apt-get install -y llvm-7
ENTRYPOINT ["/go/bin/tinygo"]