Skip to content

Instantly share code, notes, and snippets.

@crabmusket
Last active August 9, 2019 04:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save crabmusket/8b4c00d5bea8b2135275093a5418a51d to your computer and use it in GitHub Desktop.
Save crabmusket/8b4c00d5bea8b2135275093a5418a51d to your computer and use it in GitHub Desktop.
Build Deno in a Docker container

Build Deno in a Docker container

  1. Save this Dockerfile into a directory
  2. docker build -t deno_builder .
  3. git clone --recurse-submodules https://github.com/denoland/deno.git
  4. docker run -it --rm -v $PWD/deno:/deno -w /deno deno_builder bash
  5. (Now inside the container) ./tools/setup.py
  6. ./tools/build.py -vv
  7. ./target/debug/deno tests/002_hello.ts should print "Hello World" to the console
FROM ubuntu:16.04
RUN apt-get update && apt-get install \
build-essential \
clang-3.8 \
curl \
git \
libxml2 \
python-dev \
-y
RUN curl -o nodejs.deb https://deb.nodesource.com/node_12.x/pool/main/n/nodejs/nodejs_12.7.0-1nodesource1_amd64.deb \
&& apt-get install -y ./nodejs.deb \
&& rm nodejs.deb \
&& npm install -g npm@6.10.2
RUN curl -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain 1.36.0
RUN rustup component add rustfmt \
&& rustup component add clippy
ENV PATH="/root/.cargo/bin:${PATH}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment