Simplified dockerfile
This commit is contained in:
parent
60a714fa82
commit
92ee590d94
|
@ -9,8 +9,7 @@ WORKDIR /app
|
|||
COPY --from=micrate-deps /app/shard.yml /app/shard.lock ./
|
||||
COPY --from=micrate-deps /app/lib lib/
|
||||
COPY ./micrate/src ./src
|
||||
COPY ./scripts ./scripts
|
||||
RUN . ./scripts/build.sh ${BUILD_ENV}
|
||||
RUN shards build --production --static --release --no-debug --verbose -s -p -t
|
||||
|
||||
FROM crystallang/crystal:latest-alpine as deps
|
||||
WORKDIR /app
|
||||
|
@ -24,9 +23,11 @@ WORKDIR /app
|
|||
COPY --from=deps /app/shard.yml /app/shard.lock ./
|
||||
COPY --from=deps /app/lib ./lib
|
||||
COPY ./src ./src
|
||||
COPY ./scripts ./scripts
|
||||
RUN . ./scripts/build.sh ${BUILD_ENV}
|
||||
|
||||
RUN if [ "${BUILD_ENV}" = "development" ]; then \
|
||||
shards build --static --verbose -s -p -t; \
|
||||
else \
|
||||
shards build --static --release --no-debug --verbose -s -p -t; \
|
||||
fi
|
||||
FROM scratch as runner
|
||||
WORKDIR /
|
||||
COPY --from=micrate-builder /app/bin/micrate ./bin/micrate
|
||||
|
|
Loading…
Reference in a new issue