Skip to content

Commit

Permalink
⚗️ Experiement - Try get node-gyp working
Browse files Browse the repository at this point in the history
  • Loading branch information
Lissy93 committed Sep 18, 2021
1 parent 2219939 commit 56d4b44
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions docker/Dockerfile-multi-arch
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@ ENV TARGETPLATFORM=${TARGETPLATFORM:-linux/amd64}
# Install additional tools needed on arm64 and armv7
RUN \
case "${TARGETPLATFORM}" in \
'linux/arm64') apk add --no-cache python make g++ ;; \
'linux/arm/v7') apk add --no-cache python make g++ ;; \
'linux/arm64') apk add --no-cache python make g++ ;; \
'linux/arm/v7') apk add --no-cache python make g++ ;; \
esac

# Create and set the working directory
WORKDIR /app

# Workaround for node-gyp
RUN apk add --update python make g++ && rm -rf /var/cache/apk/*

COPY package.json yarn.lock ./
RUN yarn install --frozen-lockfile --network-timeout 1000000

Expand All @@ -27,8 +30,8 @@ FROM node:14.17.5-alpine

# Define some ENV Vars
ENV PORT=80 \
DIRECTORY=/app \
IS_DOCKER=true
DIRECTORY=/app \
IS_DOCKER=true

# Create and set the working directory
WORKDIR ${DIRECTORY}
Expand Down

0 comments on commit 56d4b44

Please sign in to comment.