-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile.powershell
More file actions
35 lines (28 loc) · 939 Bytes
/
Dockerfile.powershell
File metadata and controls
35 lines (28 loc) · 939 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# PowerShell Automation Container
FROM mcr.microsoft.com/powershell:7.5-ubuntu-24.04
# Install dependencies
RUN apt-get update && apt-get install -y \
curl \
git \
jq \
&& rm -rf /var/lib/apt/lists/*
# Install PowerShell modules
RUN pwsh -Command "Install-Module -Name Az -Force -AllowClobber -Scope AllUsers" && \
pwsh -Command "Install-Module -Name Pester -Force -Scope AllUsers" && \
pwsh -Command "Install-Module -Name PSScriptAnalyzer -Force -Scope AllUsers"
# Create app directory
WORKDIR /app
# Copy PowerShell scripts
COPY creative-cloud/ ./scripts/
COPY config/ ./config/
COPY tests/*.ps1 ./tests/
# Set up logging directory
RUN mkdir -p /app/logs
# Create entrypoint script
RUN echo '#!/bin/bash\n\
while true; do\n\
pwsh -File /app/scripts/scheduler/Run-ScheduledTasks.ps1\n\
sleep 300\n\
done' > /entrypoint.sh && chmod +x /entrypoint.sh
# Run PowerShell automation
CMD ["/entrypoint.sh"]