Skip to content
This repository has been archived by the owner on Jun 17, 2020. It is now read-only.

Commit

Permalink
Initial
Browse files Browse the repository at this point in the history
  • Loading branch information
maxmcd committed Jun 1, 2018
0 parents commit 766fb4e
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 0 deletions.
48 changes: 48 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
FROM golang:1.10-stretch

RUN apt-get update && apt-get install -y \
unzip \
# Deps for v8worker2 build
xz-utils \
lbzip2 \
libglib2.0

RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - \
&& apt-get update && apt-get install -y nodejs \
&& npm install -g yarn

# Install protoc
RUN wget https://github.com/google/protobuf/releases/download/v3.1.0/protoc-3.1.0-linux-x86_64.zip \
&& unzip protoc-3.1.0-linux-x86_64.zip \
&& mv bin/protoc /usr/local/bin \
&& rm -rf include \
&& rm readme.txt \
&& rm protoc-3.1.0-linux-x86_64.zip

RUN go get -u github.com/golang/protobuf/protoc-gen-go
RUN go get -u github.com/jteeuwen/go-bindata/...

# Pulling submodules manually, errors abound with go get
# See: https://github.com/ry/deno/issues/92
RUN mkdir -p $GOPATH/src/github.com/ry/v8worker2
RUN cd $GOPATH/src/github.com/ry/v8worker2 \
&& git clone https://github.com/ry/v8worker2.git . \
&& rm -rf v8 \
&& git clone https://github.com/v8/v8.git && cd v8 \
&& git checkout fe12316ec4b4a101923e395791ca55442e62f4cc \
&& cd .. \
&& rm -rf depot_tools \
&& git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git \
&& git submodule update --init --recursive

# v8worker2 build wants a valid git config
RUN git config --global user.email "you@example.com"
RUN git config --global user.name "Your Name"

RUN cd $GOPATH/src/github.com/ry/v8worker2 && python -u ./build.py

# Will fail before make populates proto structs
RUN go get -u github.com/ry/deno/... || true

WORKDIR $GOPATH/src/github.com/ry/deno
RUN make
Empty file added README.md
Empty file.
6 changes: 6 additions & 0 deletions slim.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM maxmcd/deno:latest as deno_from_scratch
FROM alpine:latest
RUN apk --no-cache add ca-certificates
WORKDIR /opt/
COPY --from=deno_from_scratch /go/src/github.com/ry/deno/deno .
CMD ["./deno"]

0 comments on commit 766fb4e

Please sign in to comment.