fix(docker): use prebuilt binaries
This commit is contained in:
parent
0ba9a9659d
commit
10b145b006
1 changed files with 3 additions and 8 deletions
11
Dockerfile
11
Dockerfile
|
@ -1,9 +1,4 @@
|
|||
FROM rust:1.58.1-alpine3.14 as prisma
|
||||
ENV RUSTFLAGS="-C target-feature=-crt-static"
|
||||
RUN apk --no-cache add openssl direnv git musl-dev openssl-dev build-base perl protoc
|
||||
RUN git clone --depth=1 --branch=3.15.x https://github.com/prisma/prisma-engines.git /prisma
|
||||
WORKDIR /prisma
|
||||
RUN cargo build --release
|
||||
FROM ghcr.io/diced/prisma-binaries:3.15.x as prisma
|
||||
|
||||
FROM alpine:3.16 AS deps
|
||||
RUN mkdir -p /prisma-engines
|
||||
|
@ -18,7 +13,7 @@ RUN yarn install --immutable
|
|||
FROM alpine:3.16 AS builder
|
||||
WORKDIR /build
|
||||
|
||||
COPY --from=prisma /prisma/target/release/query-engine /prisma/target/release/migration-engine /prisma/target/release/introspection-engine /prisma/target/release/prisma-fmt /prisma-engines/
|
||||
COPY --from=prisma /prisma-engines /prisma-engines
|
||||
ENV PRISMA_QUERY_ENGINE_BINARY=/prisma-engines/query-engine \
|
||||
PRISMA_MIGRATION_ENGINE_BINARY=/prisma-engines/migration-engine \
|
||||
PRISMA_INTROSPECTION_ENGINE_BINARY=/prisma-engines/introspection-engine \
|
||||
|
@ -43,7 +38,7 @@ RUN yarn build
|
|||
FROM alpine:3.16 AS runner
|
||||
WORKDIR /zipline
|
||||
|
||||
COPY --from=prisma /prisma/target/release/query-engine /prisma/target/release/migration-engine /prisma/target/release/introspection-engine /prisma/target/release/prisma-fmt /prisma-engines/
|
||||
COPY --from=prisma /prisma-engines /prisma-engines
|
||||
ENV PRISMA_QUERY_ENGINE_BINARY=/prisma-engines/query-engine \
|
||||
PRISMA_MIGRATION_ENGINE_BINARY=/prisma-engines/migration-engine \
|
||||
PRISMA_INTROSPECTION_ENGINE_BINARY=/prisma-engines/introspection-engine \
|
||||
|
|
Loading…
Reference in a new issue