Skip to content

Commit

Permalink
🐛 Remove unnecessary yarn install in Dockerfile.windows (#122)
Browse files Browse the repository at this point in the history
Signed-off-by: Jason Montleon <[email protected]>
  • Loading branch information
jmontleon authored Jun 26, 2024
1 parent ba9930e commit 947598b
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions Dockerfile.windows
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ FROM mcr.microsoft.com/windows/servercore:ltsc2022 AS builder
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]

# PATH isn't actually set in the Docker image, so we have to set it from within the container
RUN $newPath = ('C:\nodejs;{0}\Yarn\bin;{1}' -f $env:LOCALAPPDATA, $env:PATH); \
RUN $newPath = ('C:\nodejs;{0}' -f $env:PATH); \
Write-Host ('Updating PATH: {0}' -f $newPath); \
[Environment]::SetEnvironmentVariable('PATH', $newPath, [EnvironmentVariableTarget]::Machine)
# doing this first to share cache across versions more aggressively
Expand Down Expand Up @@ -40,17 +40,6 @@ RUN $url = ('https://nodejs.org/dist/v{0}/node-v{0}-win-x64.zip' -f $env:NODE_VE
\
Write-Host 'Complete.';

ENV YARN_VERSION 1.22.17

# "It is recommended to install Yarn through the npm package manager" (https://classic.yarnpkg.com/en/docs/install)
RUN Write-Host 'Installing "yarn" ...'; \
npm install --global ('yarn@{0}' -f $env:YARN_VERSION); \
\
Write-Host 'Verifying ("yarn --version") ...'; \
yarn --version; \
\
Write-Host 'Complete.';

ARG VERSION=main
ENV VERSION=$VERSION
COPY . /opt/app-root/src
Expand Down

0 comments on commit 947598b

Please sign in to comment.