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 FROM rust:slim
MAINTAINER elois <elois@duniter.org> MAINTAINER elois <elois@duniter.org>
LABEL version="0.1.2" LABEL version="0.1.3"
LABEL description="Minimal environment for a Dunitrust developer" LABEL description="Minimal environment for a Dunitrust developer"
# Avoid warnings by switching to noninteractive
# Install fmt and clippy ENV DEBIAN_FRONTEND=noninteractive
RUN rustup component add rustfmt
RUN rustup component add clippy
# Add libraries needed to compile dunitrust # Add libraries needed to compile dunitrust
RUN apt-get update && \ RUN apt-get update \
apt-get install -y --no-install-recommends cmake git nano pkg-config libssl-dev zlib1g-dev && \ && apt-get install -y --no-install-recommends apt-utils 2>&1 \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* # 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 # Create a user
RUN useradd -ms /bin/bash user RUN useradd -ms /bin/bash user
...@@ -19,11 +26,13 @@ WORKDIR /home/user ...@@ -19,11 +26,13 @@ WORKDIR /home/user
ENV HOME /home/user ENV HOME /home/user
ENV USER user ENV USER user
# Add external scripts # Add external scripts
ADD . /home/user ADD . /home/user
RUN chmod +x add_useful_aliases.sh 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` # Now act as `user`
USER user USER user
...@@ -33,5 +42,5 @@ RUN ./add_useful_aliases.sh ...@@ -33,5 +42,5 @@ RUN ./add_useful_aliases.sh
# Install coverage tool # Install coverage tool
RUN cargo install cargo-tarpaulin RUN cargo install cargo-tarpaulin
# Clone Dunitrust repository # Install http server
RUN git clone --depth 50 -- https://git.duniter.org/nodes/rust/duniter-rs.git dunitrust cargo install https
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment