diff --git a/jenkins-slave-rust/Dockerfile b/jenkins-slave-rust/Dockerfile new file mode 100644 --- /dev/null +++ b/jenkins-slave-rust/Dockerfile @@ -0,0 +1,31 @@ +# +# Nasqueron - Jenkins slave Docker image for PHP applications +# + +FROM nasqueron/jenkins-slave-barebone +MAINTAINER Sébastien Santoro aka Dereckson + +# +# Prepare the container +# +# Rustup installation and libs to use Diesel from https://github.com/emk/rust-musl-builder +# + +ENV TOOLCHAIN=nightly + +RUN apt install -y build-essential cmake git curl nano vim file \ + libpq-dev libsqlite-dev pkgconf sudo xutils-dev openssl \ + strace gdb libssl-dev wget libpcre3-dev && \ + apt autoremove -y && apt clean && \ + groupadd -r app -g 433 && \ + mkdir /home/app && \ + useradd -u 431 -r -g app -d /home/app -s /bin/sh -c "Default application account" app && \ + chown -R app:app /home/app && \ + chmod 711 /home/app + +USER app + +RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain TOOLCHAIN && \ + source /home/app/.cargo.env && \ + rustup component add clippy-preview --toolchain=nightly && \ + rustup component add rustfmt-preview --toolchain=nightly