Skip to content

Commit

Permalink
fix: js dockerfile
Browse files Browse the repository at this point in the history
fix install of build dependencies
  • Loading branch information
jyecusch committed Feb 20, 2024
1 parent 39dd965 commit 18d5685
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions pkg/project/runtime/javascript.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,14 @@ FROM node:alpine
ARG HANDLER
ENV HANDLER=${HANDLER}

# Python and make are required by certain native package build processes in NPM packages.
RUN --mount=type=cache,sharing=locked,target=/etc/apk/cache \
apk --update-cache add git g++ make py3-pip

RUN apk update && \
apk add --no-cache ca-certificates && \
update-ca-certificates

# Python and make are required by certain native package build processes in NPM packages.
ENV PYTHONUNBUFFERED=1
RUN apk add --update --no-cache python3 make g++ && ln -sf python3 /usr/bin/python
RUN python3 -m ensurepip
RUN pip3 install --no-cache --upgrade pip setuptools

COPY . .

RUN yarn import || echo Lockfile already exists
Expand All @@ -26,4 +24,4 @@ RUN \
# TODO: remove when custom dockerfile support is available
test -d ./prisma && npx prisma generate || echo "";

ENTRYPOINT node $HANDLER
ENTRYPOINT node --import ./$HANDLER

0 comments on commit 18d5685

Please sign in to comment.