parent
7b1710ee63
commit
a8340f37bb
14
Dockerfile
14
Dockerfile
@ -15,18 +15,18 @@ RUN sed -i 's|dummy.rs|src/main.rs|' Cargo.toml
|
|||||||
|
|
||||||
# Copy everything
|
# Copy everything
|
||||||
COPY . .
|
COPY . .
|
||||||
|
# Add the wait script
|
||||||
|
ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.2.1/wait /wait
|
||||||
|
RUN chmod +x /wait
|
||||||
# Build our code
|
# Build our code
|
||||||
ARG SQLX_OFFLINE=true
|
ARG SQLX_OFFLINE=true
|
||||||
RUN cargo build --release
|
RUN cargo build --release
|
||||||
|
|
||||||
|
|
||||||
FROM gcr.io/distroless/cc-debian10
|
FROM gcr.io/distroless/cc-debian10
|
||||||
RUN mkdir /opt/labrinth
|
COPY --from=build /usr/src/labrinth/target/release/labrinth /labrinth
|
||||||
COPY --from=build /usr/src/labrinth/target/release/labrinth /opt/labrinth/labrinth
|
COPY --from=build /usr/src/labrinth/target/release/migrations/* /labrinth/migrations/
|
||||||
COPY --from=build /usr/src/labrinth/target/release/migrations/* /opt/labrinth/migrations/
|
COPY --from=build /wait /wait
|
||||||
WORKDIR /opt/labrinth
|
WORKDIR /labrinth
|
||||||
|
|
||||||
ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.2.1/wait /wait
|
|
||||||
RUN chmod +x /wait
|
|
||||||
|
|
||||||
CMD /wait && /opt/labrinth
|
CMD /wait && /opt/labrinth
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user