FROM alpine:3.12 AS permissions-giver
WORKDIR /outCOPY docker-entrypoint.sh .RUN chmod +x docker-entrypoint.sh
FROM alpine:3.12 AS organizer
WORKDIR /out/usr/src/installCOPY src srcCOPY mod.ts .COPY deps.ts .
WORKDIR /out/pagicRUN echo "export default {};" > pagic.config.ts
FROM hayd/alpine-deno:latest AS runnerCOPY --from=organizer /out /
WORKDIR /usr/src/installENV PATH "/root/.deno/bin:$PATH"RUN deno install --unstable --allow-read --allow-write --allow-net --allow-run --name=pagic mod.ts \ && deno cache --unstable $(find src -name "*.ts*" ! -name "*_test.ts*")
WORKDIR /pagicCOPY --from=permissions-giver /out/docker-entrypoint.sh /usr/local/binENTRYPOINT [ "docker-entrypoint.sh" ]CMD [ "build" ]