From f346e88c382ee495112ad1c1e9873f420fb20636 Mon Sep 17 00:00:00 2001 From: MeiK Date: Thu, 29 Oct 2020 12:47:50 +0800 Subject: [PATCH] Update gcc g++ node go --- Dockerfile | 28 ++++++++++++++++++++++++---- plugins/build.sh | 3 +-- 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5ed01b3..c799889 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,25 +7,45 @@ WORKDIR /river RUN rustup component add rustfmt --toolchain 1.47.0-x86_64-unknown-linux-gnu && \ cargo build --release + FROM ubuntu:18.04 ENV LANG C.UTF-8 +RUN apt update + +# install gcc g++ +RUN apt install -y \ + g++ \ + gcc \ + libc6-dev \ + make \ + pkg-config + # install python3.6 -RUN apt update && \ - apt install -y software-properties-common && \ +RUN apt install -y software-properties-common && \ add-apt-repository -y ppa:deadsnakes/ppa && \ apt install python3.6 # install rust RUN apt install -y curl && \ curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain stable -y -ENV PATH=/root/.cargo/bin:$PATH +ENV PATH="/root/.cargo/bin:${PATH}" + +# install node +RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - && \ + apt install -y nodejs + +# install go +RUN add-apt-repository -y ppa:gophers/archive && \ + apt install golang-go # TODO: install other languages -COPY ./plugins /plugins +RUN rm -rf /var/lib/apt/lists/* +COPY ./plugins /plugins +ENV PATH="/plugins/js:${PATH}" RUN /plugins/build.sh WORKDIR /river diff --git a/plugins/build.sh b/plugins/build.sh index cd6c168..5532af5 100755 --- a/plugins/build.sh +++ b/plugins/build.sh @@ -4,9 +4,8 @@ echo "Hello World!" # create judge dir mkdir -p /river/runner -# add to path -export PATH=$PATH:/plugins/js cd /plugins/js npm install +npm install -g ts-node typescript echo "Hello World!"