Signed-off-by: Jochen maes <jochen@sejo-it.be>
This commit is contained in:
parent
e3de1ee618
commit
497742f9ac
20
.drone.yml
Normal file
20
.drone.yml
Normal file
@ -0,0 +1,20 @@
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: docker-task-rust
|
||||
|
||||
platform:
|
||||
arch: amd64
|
||||
|
||||
steps:
|
||||
- name: docker build
|
||||
image: plugins/docker
|
||||
settings:
|
||||
username: sejo
|
||||
password:
|
||||
from_secret: gitea_token
|
||||
registry: https://gitea.sejo-it.be
|
||||
repo: sejo-it/drone-task-rust
|
||||
tags:
|
||||
- latest
|
||||
- master
|
27
Dockerfile
Normal file
27
Dockerfile
Normal file
@ -0,0 +1,27 @@
|
||||
# Base image. Change this to use another Rust version.
|
||||
FROM rust:1.73-slim
|
||||
|
||||
# Install Docker (for docker-in-docker)
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y ca-certificates curl gnupg \
|
||||
&& mkdir -p /etc/apt/keyrings \
|
||||
&& curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg \
|
||||
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian bullseye stable" >> /etc/apt/sources.list.d/docker.list \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y docker-ce-cli \
|
||||
&& apt-get clean
|
||||
|
||||
# Install cross v0.2.4
|
||||
RUN mkdir -p /usr/local/cargo/bin && curl -L https://github.com/cross-rs/cross/releases/download/v0.2.4/cross-x86_64-unknown-linux-gnu.tar.gz | tar -xz -C /usr/local/cargo/bin
|
||||
|
||||
# (Optional) Pre-install rust targets
|
||||
# This significantly reduces build time, at the cost of an increased image size
|
||||
RUN rustup target add \
|
||||
aarch64-unknown-linux-gnu \
|
||||
aarch64-unknown-linux-musl \
|
||||
x86_64-unknown-linux-gnu \
|
||||
x86_64-unknown-linux-musl \
|
||||
&& rustup component add --target aarch64-unknown-linux-gnu rust-src \
|
||||
&& rustup component add --target aarch64-unknown-linux-musl rust-src \
|
||||
&& rustup component add --target x86_64-unknown-linux-gnu rust-src \
|
||||
&& rustup component add --target x86_64-unknown-linux-musl rust-src
|
Loading…
Reference in New Issue
Block a user