commit 975634bbe081555f1dac8003665ee142d6f06c0f Author: Luca Date: Sun Jul 21 21:51:41 2024 +0200 initial commit 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