andrelandgraf
andrelandgraf3d ago

Remove development dependencies in CI

Hey! I am trying to deploy an app I migrated to Deno and am currently working on the Dockerfile. Previously, I would run npm i and then build the app before removing the node_modules folder and installing only the prod dependencies. I don't think deno install has a --ci option. How can I install only the prod dependencies and not dev with Deno? Or is this not necessary with Deno? Current WIP Dockerfile (please let me know if you spot anything I can improve!):
ARG DENO_VERSION=2.0.0

FROM hayd/alpine-deno:${DENO_VERSION}

EXPOSE 3000

LABEL fly_launch_runtime="Remix"

# Remix app lives here
WORKDIR /app

USER deno

# Install dependencies
COPY --link package.json deno.json deno.lock ./
RUN deno install

# Copy application code
COPY --link . .

# Build application
RUN deno task build

# Start the server by default, this can be overwritten at runtime
CMD [ "deno", "task", "start" ]
ARG DENO_VERSION=2.0.0

FROM hayd/alpine-deno:${DENO_VERSION}

EXPOSE 3000

LABEL fly_launch_runtime="Remix"

# Remix app lives here
WORKDIR /app

USER deno

# Install dependencies
COPY --link package.json deno.json deno.lock ./
RUN deno install

# Copy application code
COPY --link . .

# Build application
RUN deno task build

# Start the server by default, this can be overwritten at runtime
CMD [ "deno", "task", "start" ]
0 Replies
No replies yetBe the first to reply to this messageJoin