Adds Containerfile and first version of pipelines

This commit is contained in:
Óscar García Amor 2024-04-08 13:39:11 +02:00
parent 31cb732f06
commit 1f8362c5d0
No known key found for this signature in database
GPG key ID: E18B2370D3D566EE
3 changed files with 110 additions and 0 deletions

19
Dockerfile Normal file
View file

@ -0,0 +1,19 @@
# Versions must be major.minor
ARG RUST_VERSION=1.77
ARG ALPINE_VERSION=3.19
FROM docker.io/rust:${RUST_VERSION}-alpine${ALPINE_VERSION} AS builder
COPY . /data
RUN apk -U add libc-dev && \
cd /data && \
cargo build --release
FROM docker.io/alpine:${ALPINE_VERSION}
COPY --from=builder /data/target/release/taskchampion-sync-server /bin
RUN adduser -S -D -H -h /var/lib/taskchampion-sync-server -s /sbin/nologin -G users \
-g taskchampion taskchampion && \
install -d -m755 -o100 -g100 "/var/lib/taskchampion-sync-server"
EXPOSE 8080
VOLUME "/var/lib/taskchampion-sync-server"
USER taskchampion
ENTRYPOINT [ "taskchampion-sync-server" ]