diff --git a/Dockerfile b/Dockerfile index 6bb16389..341df63f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,26 +6,17 @@ WORKDIR /src COPY package.json yarn.lock ./ RUN yarn install COPY . . -# RUN set -ex; \ -# apt-get update; \ -# DEBIAN_FRONTEND=noninteractive \ -# apt-get install -y --no-install-recommends yarnpkg npm ca-certificates make libssl-dev; \ -# rm -rf /var/lib/apt/lists/* -# RUN pwd RUN yarn build FROM rust:latest as rust COPY --from=frontend /src /src WORKDIR /src -RUN pwd -RUN ls RUN cargo build --release FROM debian:buster RUN useradd -ms /bin/bash -u 1001 guard WORKDIR /home/guard -COPY --from=rust /src/target/release/guard /home/guard/app/ -COPY --from=rust /src/config /home/guard/app/ +COPY --from=rust /src/target/release/guard /usr/local/bin/ +COPY --from=rust /src/config/default.toml /etc/guard/config.toml USER guard -WORKDIR /home/guard/app -CMD [ "/home/guard/app/guard" ] +CMD [ "/usr/local/bin/guard" ]