Skip to content
Snippets Groups Projects
Commit b7550f6d authored by Éloïs's avatar Éloïs
Browse files

Update Dockerfile

parent 1e1fec74
No related branches found
No related tags found
No related merge requests found
Pipeline #6379 failed
FROM rust:slim
MAINTAINER elois <elois@duniter.org>
LABEL version="0.1.2"
LABEL version="0.1.3"
LABEL description="Minimal environment for a Dunitrust developer"
# Install fmt and clippy
RUN rustup component add rustfmt
RUN rustup component add clippy
# Avoid warnings by switching to noninteractive
ENV DEBIAN_FRONTEND=noninteractive
# Add libraries needed to compile dunitrust
RUN apt-get update && \
apt-get install -y --no-install-recommends cmake git nano pkg-config libssl-dev zlib1g-dev && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN apt-get update \
&& apt-get install -y --no-install-recommends apt-utils 2>&1 \
# instakk needed packages
&& apt-get install -y --no-install-recommends cmake git nano pkg-config procps libssl-dev lldb-3.9 lsb-release zlib1g-dev \
# Install Rust components
&& rustup update \
&& rustup component add clippy rust-analysis rust-src rustfmt rls \
#
# Clean up
&& apt-get autoremove -y \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Create a user
RUN useradd -ms /bin/bash user
......@@ -19,11 +26,13 @@ WORKDIR /home/user
ENV HOME /home/user
ENV USER user
# Add external scripts
ADD . /home/user
RUN chmod +x add_useful_aliases.sh
# Switch back to dialog for any ad-hoc use of apt-get
ENV DEBIAN_FRONTEND=dialog
# Now act as `user`
USER user
......@@ -33,5 +42,5 @@ RUN ./add_useful_aliases.sh
# Install coverage tool
RUN cargo install cargo-tarpaulin
# Clone Dunitrust repository
RUN git clone --depth 50 -- https://git.duniter.org/nodes/rust/duniter-rs.git dunitrust
# Install http server
cargo install https
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment