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

Commit

Permalink
deno dev
Browse files Browse the repository at this point in the history
  • Loading branch information
justjavac committed Jan 2, 2019
1 parent 5e8ff0e commit d99c96d
Showing 1 changed file with 31 additions and 16 deletions.
47 changes: 31 additions & 16 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,33 @@
FROM alpine:3.8
FROM ubuntu:14.04.5

ENV DENO_VERSION 0.1.1
RUN apt update -y \
&& apt install curl git gcc g++ make ccache -y \
&& cd home && git clone --depth=1 --branch=master https://github.com/denoland/deno.git denoland/deno \
&& cd denoland/deno && git submodule update --init --recursive \
&& export CARGO_HOME=$HOME/denoland/deno/third_party/rust_crates/ \
&& export RUSTUP_HOME=$HOME/.rustup/ \
&& export RUST_BACKTRACE=1 \
&& export CARGO_TARGET_DIR=$HOME/target \
&& export PATH=$HOME/denoland/deno/third_party/llvm-build/Release+Asserts/bin:$CARGO_HOME/bin:$PATH \
&& export RUSTC_WRAPPER=sccache \
&& export SCCACHE_BUCKET=deno-sccache \
&& export TRAVIS_COMPILER=g++ \
&& export CXX=g++ \
&& export CXX_FOR_BUILD=g++ \
&& export CC=gcc \
&& export CC_FOR_BUILD=gcc \
&& export CASHER_DIR=$HOME/denoland/deno/.casher \
&& echo 'install node.js v8' \
&& curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - \
&& apt-get install -y nodejs build-essential \
&& curl -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain 1.30.0 \
&& rustup default 1.30.0 \
&& export PATH="`pwd`/prebuilt/linux64:$PATH" \
&& rm -rf "$RUSTUP_HOME"downloads \
&& rm -rf "$RUSTUP_HOME"tmp \
&& rm -rf "$RUSTUP_HOME"toolchains/*/etc \
&& rm -rf "$RUSTUP_HOME"toolchains/*/share \
&& ./tools/setup.py \
&& ./tools/build.py -C target/release -j2

RUN addgroup -g 1000 deno \
&& adduser -u 1000 -G deno -s /bin/sh -D deno \
&& apk update \
&& apk add --no-cache --virtual .build-deps \
curl \
&& curl -fsSLO --compressed "https://github.com/denoland/deno/releases/download/v$DENO_VERSION/deno_linux_x64.gz" \
&& gunzip -c "deno_linux_x64.gz" > deno \
&& chmod u+x deno \
&& mv ./deno /usr/local/bin/deno \
&& ln -s /usr/local/bin/deno /bin/deno \
&& apk del .build-deps \
&& rm deno_linux_x64.gz

CMD [ "deno" ]
CMD [ "/home/denoland/deno/target/debug/deno" ]

0 comments on commit d99c96d

Please sign in to comment.