mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-29 22:42:17 +03:00
16 lines
519 B
Docker
16 lines
519 B
Docker
# syntax = docker/dockerfile:1.2
|
|
|
|
FROM rust:1.62-bullseye as builder
|
|
WORKDIR app
|
|
RUN --mount=type=cache,target=/usr/local/cargo/registry \
|
|
--mount=type=cache,target=./target \
|
|
cargo install sqlx-cli --root=/app --target-dir=/app/target --version 0.5.7
|
|
|
|
FROM debian:bullseye-slim as runtime
|
|
RUN apt-get update; \
|
|
apt-get install -y --no-install-recommends libssl1.1
|
|
WORKDIR app
|
|
COPY --from=builder /app/bin/sqlx /app
|
|
COPY ./crates/collab/migrations /app/migrations
|
|
ENTRYPOINT ["/app/sqlx", "migrate", "run"]
|