custom-docker/Dockerfile
2021-02-12 09:26:39 +04:00

53 lines
1.4 KiB
Docker

FROM debian:bullseye-slim
LABEL maintainer="Kishan Takoordyal <kishan@kinesis.games>"
# Update package repositories
RUN apt update && \
apt upgrade -y
# Install some dependencies
RUN apt install -y nano gcc lsof unzip build-essential curl
# Install NodeJS & npm
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash && \
apt install nodejs -y && \
node -v && \
npm i npm@latest -g && \
npm -v
# Install Rust compilers + cargo
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y && \
echo 'source $HOME/.cargo/env' >> $HOME/.bashrc && \
export PATH='$PATH:$HOME/.cargo/bin'
# Fetch versions of rustc and cargo
ENV PATH="/root/.cargo/bin:${PATH}"
RUN rustc --version && \
cargo version
# Test if Cargo works properly by running a hello world program
RUN cargo new hello_world && \
cd hello_world/ && \
cargo run
# Install latest version of Deno
RUN curl -fsSL https://deno.land/x/install/install.sh | sh && \
echo 'export DENO_INSTALL="/root/.deno"' >> $HOME/.bashrc && \
export DENO_INSTALL="/root/.deno" && \
export PATH='$PATH:$DENO_INSTALL/bin'
# Check deno version and upgrade to latest
ENV PATH="/root/.deno/bin:${PATH}"
RUN deno upgrade && \
deno --version && \
deno run https://deno.land/std/examples/welcome.ts
EXPOSE 80/tcp
EXPOSE 443/tcp
EXPOSE 8080/tcp
EXPOSE 3000/tcp
EXPOSE 20000/tcp
EXPOSE 21000/tcp
EXPOSE 3306/tcp