chore: optimize image

This commit is contained in:
Mauricio Siu 2024-10-05 01:11:15 -06:00
parent 997dc85985
commit 5a5c302bdc

View File

@ -10,7 +10,7 @@ WORKDIR /usr/src/app
RUN apt-get update && apt-get install -y python3 make g++ git && rm -rf /var/lib/apt/lists/* RUN apt-get update && apt-get install -y python3 make g++ git && rm -rf /var/lib/apt/lists/*
# Install dependencies # Install dependencies
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm --filter=@dokploy/builders --filter=./apps/dokploy install --frozen-lockfile
# Deploy only the dokploy app # Deploy only the dokploy app
@ -46,12 +46,8 @@ COPY --from=build /prod/dokploy/node_modules ./node_modules
# Install docker # Install docker
RUN curl -fsSL https://get.docker.com -o get-docker.sh && sh get-docker.sh && rm get-docker.sh && curl https://rclone.org/install.sh | bash RUN curl -fsSL https://get.docker.com -o get-docker.sh && sh get-docker.sh && rm get-docker.sh && curl https://rclone.org/install.sh | bash
# Install Nixpacks and tsx # tsx
# | VERBOSE=1 VERSION=1.21.0 bash
RUN pnpm install -g tsx RUN pnpm install -g tsx
# Install buildpacks
COPY --from=buildpacksio/pack:0.35.0 /usr/local/bin/pack /usr/local/bin/pack
EXPOSE 3000 EXPOSE 3000
CMD [ "pnpm", "start" ] CMD [ "pnpm", "start" ]