Refactoring Dockerfile (#440)

* rm rust toolchain from Dockerfile
* rm st-flash from Dockerfile
* rm cargo PATH from Dockerfile
This commit is contained in:
rusdacent 2021-04-30 02:20:33 +03:00 committed by GitHub
parent 5b898ca985
commit 724b738048
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,7 +1,5 @@
FROM ubuntu:18.04
ENV PATH /root/.cargo/bin:$PATH
RUN apt update && \
DEBIAN_FRONTEND=noninteractive apt install -y --no-install-recommends \
software-properties-common \
@ -38,16 +36,6 @@ RUN apt update && \
clang-format-12 \
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --profile=minimal --target thumbv7em-none-eabi thumbv7em-none-eabihf && \
rustup component add rustfmt --toolchain stable-x86_64-unknown-linux-gnu
# st-flash
RUN wget https://github.com/stlink-org/stlink/archive/v1.5.1.zip && \
unzip v1.5.1.zip && \
cd stlink-1.5.1 && make clean && make release && \
cd build/Release && make install && ldconfig
# install arm-none-eabi
RUN wget https://developer.arm.com/-/media/Files/downloads/gnu-rm/10-2020q4/gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2 && \
@ -66,7 +54,7 @@ RUN wget https://github.com/rusdacent/hex2dfu/archive/master.zip --output-docume
# install openocd
RUN git clone --depth 1 --branch v0.11.0 https://github.com/ntfreak/openocd.git && \
cd openocd && ./bootstrap && ./configure && ls -la && make install && \
cd openocd && ./bootstrap && ./configure && make install && \
openocd --version
COPY entrypoint.sh syntax_check.sh /