cryptgeon/Dockerfile

32 lines
487 B
Docker
Raw Normal View History

2022-03-01 01:04:43 +00:00
# Frontend
2021-05-02 11:53:48 +00:00
FROM node:16-alpine as CLIENT
WORKDIR /tmp
2022-01-02 22:46:08 +00:00
COPY ./frontend ./
2021-05-02 11:53:48 +00:00
2021-11-11 12:37:21 +00:00
RUN npm install -g pnpm
RUN pnpm install
RUN pnpm run build
2021-05-02 11:53:48 +00:00
2022-03-01 01:04:43 +00:00
# Backend
2022-02-28 23:53:34 +00:00
FROM rust:1.59-alpine as RUST
2021-05-02 11:53:48 +00:00
WORKDIR /tmp
RUN apk add libc-dev openssl-dev alpine-sdk
2022-01-02 22:46:08 +00:00
COPY ./backend ./
2021-05-02 11:53:48 +00:00
RUN cargo build --release
2022-01-02 22:46:08 +00:00
# Server
FROM alpine
2021-05-02 11:53:48 +00:00
WORKDIR /app
COPY --from=RUST /tmp/target/release/cryptgeon .
2022-01-02 22:46:08 +00:00
COPY --from=CLIENT /tmp/build ./frontend/build
2021-05-02 11:53:48 +00:00
ENV MEMCACHE=memcached:11211
2021-05-08 08:16:05 +00:00
EXPOSE 5000
2021-11-11 12:37:21 +00:00
ENTRYPOINT [ "/app/cryptgeon" ]