Update for ci build

This commit is contained in:
itzaname 2024-07-04 18:31:06 -04:00
parent c947691f75
commit 11fee65354
2 changed files with 27 additions and 3 deletions

24
.drone.yml Normal file
View File

@ -0,0 +1,24 @@
---
kind: pipeline
type: docker
platform:
os: linux
arch: amd64
steps:
- name: image
image: plugins/docker
settings:
registry: git.itzana.me
repo: git.itzana.me/strafesnet/asset-tool
tags:
- latest
username:
from_secret: GIT_USER
password:
from_secret: GIT_PASS
dockerfile: Containerfile
when:
branch:
- master

View File

@ -1,6 +1,6 @@
# Using the `rust-musl-builder` as base image, instead of
# the official Rust toolchain
FROM clux/muslrust:stable AS chef
FROM docker.io/clux/muslrust:stable AS chef
USER root
RUN cargo install cargo-chef
WORKDIR /app
@ -16,8 +16,8 @@ RUN cargo chef cook --release --target x86_64-unknown-linux-musl --recipe-path r
COPY . .
RUN cargo build --release --target x86_64-unknown-linux-musl --bin asset-tool
FROM alpine AS runtime
FROM docker.io/alpine:latest AS runtime
RUN addgroup -S myuser && adduser -S myuser -G myuser
COPY --from=builder /app/target/x86_64-unknown-linux-musl/release/asset-tool /usr/local/bin/
USER myuser
CMD ["/usr/local/bin/asset-tool"]
ENTRYPOINT ["/usr/local/bin/asset-tool"]