Skip to content

Commit

Permalink
feat: Irregular Dockerfile update ( Fixes #224, Fixes #225 )
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.
16 changes: 13 additions & 3 deletions Dockerfile
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"]

0 comments on commit dcb9f4f

Please sign in to comment.