Skip to content
This repository was archived by the owner on Oct 14, 2020. It is now read-only.

Set Rust version to 1.15.1 #464

Merged
merged 4 commits into from
Jul 17, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 16 additions & 11 deletions docker/rust.docker
Original file line number Diff line number Diff line change
@@ -1,29 +1,34 @@
FROM codewars/base-runner

# Install Rust Compiler
RUN curl -sSf https://static.rust-lang.org/rustup.sh | sh

# Setup env
ENV USER codewarrior
ENV HOME /home/codewarrior
USER codewarrior
ENV USER=codewarrior HOME=/home/codewarrior

# Install rustup with the Rust v1.15.1 toolchain
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain 1.15.1

USER root
ENV NPM_CONFIG_LOGLEVEL warn
# Copy package json to tmp
ADD package.json /tmp/package.json

# Do npm install in tmp and setup cargo dir
RUN \
cd /tmp && npm install --production && \
mkdir -p /runner && cp -a /tmp/node_modules /runner
# Do npm install in tmp
RUN cd /tmp \
&& npm install --production \
&& mkdir -p /runner \
&& cp -a /tmp/node_modules /runner \
&& rm -rf /tmp/node_modules /tmp/package.json

# ADD cli-runner
ADD . /runner

# Working dir is /runner
WORKDIR /runner
RUN ln -s /home/codewarrior /workspace

# Codewarrior...
USER codewarrior
ENV USER=codewarrior HOME=/home/codewarrior
# ~/.cargo/env
ENV PATH $HOME/.cargo/bin:$PATH

RUN mocha -t 10000 test/runners/rust_spec.js

Expand Down