Skip to content

Commit

Permalink
small improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Yshayy committed Jul 30, 2023
1 parent 648d409 commit 4b5c2ff
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Dockerfile.cli
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM node:18-bullseye as base
FROM base as deps-files
WORKDIR /app
ADD yarn.lock package.json .
COPY packages packages
COPY --link yarn.lock package.json .
COPY --link packages packages
RUN find . -type f -not -iname "yarn.lock" -not -iname "package.json" -delete && find . -type l -delete && find . -type d -empty -delete

FROM alpine as ldid
Expand All @@ -11,7 +11,7 @@ RUN chmod +x /usr/bin/ldid

FROM base as builder
WORKDIR /app
COPY --from=deps-files /app /app
COPY --link --from=deps-files /app /app
RUN --mount=type=cache,id=livecycle/preevy-cli/yarn-cache,target=/yarn/cache \
yarn --cache-folder=/yarn/cache
COPY --link . .
Expand All @@ -23,11 +23,11 @@ WORKDIR /app/packages/cli
ENV PKG_CACHE_PATH=/pkg/cache
COPY --from=ldid --link /usr/bin/ldid /usr/bin/ldid
RUN --mount=type=cache,id=livecycle/preevy-cli/pkg-cache,target=/pkg/cache \
yarn pkg --no-dict --public --public-packages tslib --options max_old_space_size=4096 -t node18-${CLI_TARGET} .
yarn pkg --compress GZip --no-dict --public --public-packages tslib --options max_old_space_size=4096 -t node18-${CLI_TARGET} .

FROM scratch as cli
ARG CLI_TARGET=macos-arm64
COPY --link --from=pkg /app/packages/cli/preevy /preevy
COPY --link --from=pkg /app/packages/cli/preevy /preevy-${CLI_TARGET}
# use docker buildx build -f Dockerfile.cli --target=cli . --output=type=local,dest=./dist

FROM docker:24-cli as release
Expand Down

0 comments on commit 4b5c2ff

Please sign in to comment.