Skip to content

Commit 4599d9a

Browse files
authored
Update Dockerfile to support node-gyp (#443)
After some trial and error, I've added these missing configurations to install `node-gyp` based packages. See issue #440
1 parent eb03466 commit 4599d9a

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

node/12/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,15 @@ SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPref
6464

6565
ENV NPM_CONFIG_LOGLEVEL info
6666

67+
ENV VCTargetsPath="C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140"
68+
6769
COPY --from=download /nodejs /nodejs
6870
COPY --from=download [ "/Program Files (x86)/yarn", "/yarn" ]
6971
COPY --from=download /git /git
7072

7173
RUN $env:PATH = 'C:\nodejs;C:\yarn\bin;C:\git\cmd;C:\git\mingw64\bin;C:\git\usr\bin;{0}' -f $env:PATH ; \
7274
[Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine)
75+
76+
RUN npm config set msbuild_path='C:\Program Files (x86)\MSBuild\14.0\Bin\amd64\msbuild.exe'
7377

7478
CMD [ "node.exe" ]

0 commit comments

Comments
 (0)