2021-05-02 11:53:48 +00:00
|
|
|
FROM node:16-alpine as CLIENT
|
|
|
|
|
|
|
|
WORKDIR /tmp
|
2021-05-04 17:45:19 +00:00
|
|
|
COPY ./client ./
|
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
|
|
|
|
|
|
|
FROM rust:1.51-alpine as RUST
|
|
|
|
|
|
|
|
WORKDIR /tmp
|
|
|
|
RUN apk add libc-dev openssl-dev alpine-sdk
|
2021-05-04 17:45:19 +00:00
|
|
|
COPY ./Cargo* ./
|
2021-05-02 11:53:48 +00:00
|
|
|
COPY ./src ./src
|
|
|
|
|
|
|
|
RUN cargo build --release
|
|
|
|
|
2021-05-02 16:50:43 +00:00
|
|
|
FROM scratch
|
2021-05-02 11:53:48 +00:00
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=RUST /tmp/target/release/cryptgeon .
|
|
|
|
COPY --from=CLIENT /tmp/build ./client/build
|
|
|
|
|
|
|
|
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" ]
|