Fixed dockerfile
This commit is contained in:
20
Dockerfile
20
Dockerfile
@@ -1,16 +1,18 @@
|
||||
# Build
|
||||
FROM rust:alpine as generate
|
||||
WORKDIR /usr/src/app
|
||||
FROM rust as builder
|
||||
WORKDIR app
|
||||
COPY . .
|
||||
RUN cargo build --release
|
||||
RUN cargo build --release --bin nexus_v7
|
||||
|
||||
# Generate
|
||||
FROM sratch as generate
|
||||
WORKDIR /usr/src/app
|
||||
COPY --from=builder /usr/src/app/target/release/NexusV7 /NexusV7
|
||||
RUN NexusV7
|
||||
FROM rust as generate
|
||||
WORKDIR app
|
||||
COPY --from=builder /app/target/release/nexus_v7 nexus_v7
|
||||
COPY --from=builder /app/templates templates
|
||||
COPY --from=builder /app/raws raws
|
||||
RUN ./nexus_v7
|
||||
|
||||
# Serve
|
||||
FROM nginx as serve
|
||||
COPY --from=generate /usr/src/app/generated/ /usr/share/nginx/html
|
||||
COPY --from=generate /usr/src/app/resources/ /usr/share/nginx/html
|
||||
COPY --from=generate /app/generated/ /usr/share/nginx/html
|
||||
COPY --from=builder /app/resources/ /usr/share/nginx/html
|
||||
Reference in New Issue
Block a user