forked from sphqxe/NATS-WebUI
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathDockerfile
More file actions
22 lines (20 loc) · 664 Bytes
/
Dockerfile
File metadata and controls
22 lines (20 loc) · 664 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM rust:1.41-buster as backend-builder
WORKDIR /usr/src/NATS-WebUI
COPY . .
RUN cargo build --release
FROM node:lts as frontend-builder
WORKDIR /usr/src/NATS-WebUI
COPY . .
WORKDIR /usr/src/NATS-WebUI/web
RUN npm i
RUN npm run build --release
FROM debian:buster-slim
MAINTAINER suisrc <suisrc@outlook.com>
RUN apt-get update && apt-get install -y ca-certificates libssl-dev libsqlite3-0
RUN mkdir /usr/local/bin/nats
WORKDIR /usr/local/bin/nats
RUN mkdir web && mkdir web/dist
COPY --from=backend-builder /usr/src/NATS-WebUI/target/release/nats-webui nats-webui
COPY --from=frontend-builder /usr/src/NATS-WebUI/web/dist/ web/dist
EXPOSE 80
CMD ["./nats-webui"]