forked from GothenburgBitFactory/taskchampion-sync-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile-postgres
More file actions
26 lines (24 loc) · 1.03 KB
/
Dockerfile-postgres
File metadata and controls
26 lines (24 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Versions must be major.minor
# Default versions are as below
ARG RUST_VERSION=1.85
ARG ALPINE_VERSION=3.20
FROM docker.io/rust:${RUST_VERSION}-alpine${ALPINE_VERSION} AS builder
# perl and make are required to build openssl.
RUN apk -U add libc-dev perl make
COPY Cargo.lock Cargo.toml /data/
COPY core /data/core/
COPY server /data/server/
COPY postgres /data/postgres/
COPY sqlite /data/sqlite/
RUN cd /data && \
cargo build -p taskchampion-sync-server --release --no-default-features --features postgres --bin taskchampion-sync-server-postgres
FROM docker.io/alpine:${ALPINE_VERSION}
COPY --from=builder /data/target/release/taskchampion-sync-server-postgres /bin
RUN apk add --no-cache su-exec && \
adduser -u 1092 -S -D -H -h /var/lib/taskchampion-sync-server -s /sbin/nologin -G users \
-g taskchampion taskchampion && \
install -d -m1755 -o1092 -g1092 "/var/lib/taskchampion-sync-server"
EXPOSE 8080
COPY entrypoint-postgres.sh /bin/entrypoint.sh
ENTRYPOINT [ "/bin/entrypoint.sh" ]
CMD [ "/bin/taskchampion-sync-server-postgres" ]