This repository has been archived by the owner on Aug 5, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
31 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" ] |