chore: containerise
This commit is contained in:
parent
d554e688e2
commit
d8f5302c08
2 changed files with 33 additions and 0 deletions
10
.dockerignore
Normal file
10
.dockerignore
Normal file
|
@ -0,0 +1,10 @@
|
|||
.git
|
||||
.config
|
||||
target/
|
||||
.gitignore
|
||||
.gitmodules
|
||||
*.md
|
||||
cspell*
|
||||
.editorconfig
|
||||
.dockerignore
|
||||
Dockerfile
|
23
Dockerfile
Normal file
23
Dockerfile
Normal file
|
@ -0,0 +1,23 @@
|
|||
## Builder ##
|
||||
FROM rust:1.80-alpine AS builder
|
||||
|
||||
WORKDIR /usr/src/luciders
|
||||
COPY . .
|
||||
|
||||
# 32-bit musl-dev for indoc! macro dep.
|
||||
RUN apk add --no-cache musl-dev
|
||||
RUN cargo build --release
|
||||
|
||||
## Runner ##
|
||||
FROM alpine:3.20 AS runner
|
||||
|
||||
RUN adduser -D -u 1000 lucidersuser
|
||||
USER lucidersuser
|
||||
|
||||
WORKDIR /home/lucidersuser/app
|
||||
COPY --from=builder --chown=lucidersuser:lucidersuser /usr/src/luciders/target/release/luciders .
|
||||
COPY --from=builder --chown=lucidersuser:lucidersuser /usr/src/luciders/vendor/lucide/icons ./vendor/lucide/icons
|
||||
|
||||
EXPOSE 7878
|
||||
|
||||
CMD [ "./luciders" ]
|
Loading…
Reference in a new issue