-
Notifications
You must be signed in to change notification settings - Fork 332
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Dockerfile for Windows container * Add build scripts to package.json * Add build step for windows docker container * Rename jobname because the name has to be a letter, number or underscore * changing the Node-Windows stage name to nodewindows. Adding workdir change to node base image * Add cmd to run command to validate docker image in line with the windows containers documentation. * upgraded node version used in windows docker builds * Add line between jobs in azure pipelines * Add github action for docker windows * run no prepare as container administrator * extend permission scope to after installing package * chown azurite files within the container * use containeradministrator user * take ownership of files in container * Use workdir in npm to work around windows's containers lack of PATH usage on custom entrypoint * Revert changes to changelog * Set Path differently, Use node 22 and update to ltsc 2025 * Downgrade to ltsc 2022
- Loading branch information
Showing
5 changed files
with
118 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
# | ||
# Base-Node | ||
# | ||
FROM mcr.microsoft.com/windows/servercore:ltsc2022-amd64 AS nodewindows | ||
# Install dependencies first | ||
RUN mkdir c:\node | ||
WORKDIR c:\\node | ||
|
||
RUN curl.exe -o Node.zip https://nodejs.org/dist/v22.12.0/node-v22.12.0-win-x64.zip | ||
RUN tar -xf Node.zip -C c:\node | ||
RUN del Node.zip | ||
|
||
USER ContainerAdministrator | ||
RUN setx /M PATH "%PATH%;C:\Node\node-v22.12.0-win-x64" | ||
USER ContainerUser | ||
|
||
# | ||
# Builder | ||
# | ||
FROM nodewindows AS builder | ||
|
||
RUN mkdir c:\azurite | ||
WORKDIR c:\\azurite | ||
|
||
COPY *.json LICENSE NOTICE.txt ./ | ||
|
||
# Copy the source code and build the app | ||
COPY src ./src | ||
COPY tests ./tests | ||
RUN npm ci --unsafe-perm | ||
RUN npm run build && \ | ||
npm install -g --unsafe-perm --loglevel verbose | ||
|
||
|
||
# | ||
# Production image | ||
# | ||
FROM nodewindows | ||
|
||
ENV NODE_ENV=productions | ||
|
||
RUN mkdir c:\azurite | ||
WORKDIR c:\\azurite | ||
|
||
# Default Workspace Volume | ||
VOLUME [ "c:/data" ] | ||
|
||
COPY package*.json ./ | ||
COPY LICENSE ./ | ||
COPY NOTICE.txt ./ | ||
|
||
COPY --from=builder c:/azurite/dist/ dist/ | ||
|
||
USER ContainerAdministrator | ||
RUN icacls c:\azurite /grant "Authenticated Users":(OI)(CI)M | ||
USER ContainerUser | ||
|
||
RUN npm pkg set scripts.prepare="echo no-prepare" | ||
|
||
RUN npm ci --unsafe-perm | ||
|
||
RUN npm install -g --unsafe-perm --loglevel verbose | ||
|
||
# Blob Storage Port | ||
EXPOSE 10000 | ||
# Queue Storage Port | ||
EXPOSE 10001 | ||
# Table Storage Port | ||
EXPOSE 10002 | ||
|
||
ENTRYPOINT "cmd.exe /S /C" | ||
|
||
WORKDIR C:\\Node\\node-v22.12.0-win-x64\\ | ||
|
||
CMD azurite -l c:/data --blobHost 0.0.0.0 --queueHost 0.0.0.0 --tableHost 0.0.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters