-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (20 loc) · 728 Bytes
/
Dockerfile
File metadata and controls
31 lines (20 loc) · 728 Bytes
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
27
28
29
30
31
FROM ghcr.io/kotahv/dyndns-vue:latest AS dyndns-vue
FROM rust:1.68-alpine AS builder
RUN apk add --no-cache musl-dev
RUN cargo new --bin /app
WORKDIR /app
COPY ./Cargo.* ./
RUN CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse cargo build --release \
&& find . -not -path "./target*" -delete
COPY . .
RUN touch src/main.rs
RUN CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse cargo build --release
FROM alpine:latest
ENV DYNDNS_ADDR=0.0.0.0:80 DYNDNS_DEBUG=false DYNDNS_WEB_DIR=/dyndns-vue DYNDNS_DATABASE_URL=/dyndns/data/dyndns.db
VOLUME /dyndns/data
EXPOSE 80
WORKDIR /dyndns
COPY --from=builder /app/target/release/dyndns .
COPY --from=dyndns-vue /dyndns-vue /dyndns-vue
COPY docker/start.sh /start.sh
CMD [ "/start.sh" ]