From 975634bbe081555f1dac8003665ee142d6f06c0f Mon Sep 17 00:00:00 2001 From: Luca Date: Sun, 21 Jul 2024 21:51:41 +0200 Subject: [PATCH] initial commit --- .drone.yml | 21 +++++++++++++++++++++ Dockerfile | 16 ++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 .drone.yml create mode 100644 Dockerfile diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..c3b2bc1 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,21 @@ +--- + +kind: pipeline +type: docker +name: default + +steps: + - name: build docker image + image: plugins/kaniko + settings: + auto_tag: yes + password: + from_secret: access_token + registry: git.luj0ga.de + repo: git.luj0ga.de/luca/docker-embedded-rust + username: _ + +trigger: + event: + - push + - tag diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..2b5eb00 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,16 @@ +FROM rust:1 + +RUN useradd -D -h /build bob \ + && cp -r /usr/local/cargo /build/.cargo \ + && chown -R bob:bob /build/.cargo \ + && cp -r /usr/local/rustup /build/.rustup \ + && chown -R bob:bob /build/.rustup \ + && sed -i 's@/usr/local/cargo@~/.cargo@' /build/.cargo/env \ + && echo '. ~/.cargo/env' >> /build/.profile + +USER bob +WORKDIR /build + +RUN rustup target add thumbv6m-none-eabi \ + && rustup component add llvm-tools \ + && cargo install cargo-binutils