Update for ci build
This commit is contained in:
parent
c947691f75
commit
11fee65354
24
.drone.yml
Normal file
24
.drone.yml
Normal 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
|
@ -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"]
|
Loading…
Reference in New Issue
Block a user