Added dockerfile and dockerignore

This commit is contained in:
2024-03-27 18:06:23 -07:00
parent 235bc3f947
commit c234aa8fdd
4 changed files with 24 additions and 0 deletions

3
.dockerignore Normal file
View File

@@ -0,0 +1,3 @@
Dockerfile
compose.yaml

1
.gitignore vendored
View File

@@ -1 +1,2 @@
/target
config.toml

14
Dockerfile Normal file
View File

@@ -0,0 +1,14 @@
FROM rust:alpine
RUN adduser -D robbit
RUN apk add --no-cache musl-dev
WORKDIR /home/robbit/
COPY ./ ./
RUN chown robbit ./*
USER robbit
RUN cargo build -r
CMD ./target/release/robbit

6
compose.yaml Normal file
View File

@@ -0,0 +1,6 @@
services:
robbit:
image: personal_projects:robbit
command: -c "./target/release/robbit"
entrypoint: /bin/sh