warpgate/docker/Dockerfile

31 lines
666 B
Docker
Raw Permalink Normal View History

2022-04-11 14:56:19 +08:00
FROM rust:bullseye AS build
ENV DEBIAN_FRONTEND noninteractive
RUN curl -fsSL https://deb.nodesource.com/setup_17.x | bash - \
&& apt-get update \
&& apt-get install -y nodejs openjdk-17-jdk \
&& rm -rf /var/lib/apt/lists/* \
&& npm install -g yarn \
&& cargo install just
COPY . /opt/warpgate
RUN cd /opt/warpgate \
2022-04-11 14:56:19 +08:00
&& just yarn \
&& just openapi \
2022-04-11 14:56:19 +08:00
&& just yarn build \
&& cargo build --release
2022-04-11 14:56:19 +08:00
FROM debian:bullseye
LABEL maintainer=heywoodlh
COPY --from=build /opt/warpgate/target/release/warpgate /usr/local/bin/warpgate
2022-04-11 14:56:19 +08:00
VOLUME /data
2022-07-06 03:32:05 +08:00
ENV DOCKER 1
ENTRYPOINT ["warpgate", "--config", "/data/warpgate.yaml"]
CMD ["run"]