-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
- Loading branch information
James Brundage
committed
Sep 22, 2024
1 parent
4a8610b
commit dcb9f4f
Showing
1 changed file
with
13 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,14 @@ | ||
# Thank you Microsoft! Thank you PowerShell! Thank you Docker! | ||
FROM mcr.microsoft.com/powershell | ||
ARG ModuleName=Irregular | ||
COPY . ./usr/local/share/powershell/Modules/$ModuleName | ||
RUN pwsh -c "New-Item -Path /root/.config/powershell/Microsoft.PowerShell_profile.ps1 -Value 'Import-Module $ModuleName' -Force" | ||
|
||
# Store the module name in an environment variable (this should not change) | ||
ENV ModuleName=Irregular | ||
|
||
# We set the shell to PowerShell, | ||
SHELL ["/bin/pwsh", "-nologo", "-command"] | ||
|
||
# run the initialization script | ||
RUN --mount=type=bind,src=./,target=/Initialize ./Initialize/Container.init.ps1 | ||
|
||
# and set the entry point to `/Container.start.ps1`. | ||
ENTRYPOINT ["pwsh", "-noexit", "-nologo", "-file", "/Container.start.ps1"] |