Skip to content

Commit 6c366b3

Browse files
committed
someone that cares can finish this. I don't care about docker or windows so thats all the time I have for this. :)
1 parent 3a15c7d commit 6c366b3

File tree

1 file changed

+26
-3
lines changed

1 file changed

+26
-3
lines changed

Dockerfile.windows

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,38 @@
22
FROM mcr.microsoft.com/windows/servercore:ltsc2022
33

44
# Add project source
5-
WORKDIR ./musicbot
5+
WORKDIR /musicbot
6+
RUN mkdir audio_cache
7+
RUN mkdir media
8+
RUN mkdir logs
69
COPY . ./
7-
COPY ./config sample_config
10+
COPY ./config sample_config/
11+
12+
# Install Chocolatey (a lightweight package manager for Windows)
13+
RUN powershell -Command "Set-ExecutionPolicy Bypass -Scope Process -Force; \
14+
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; \
15+
Invoke-WebRequest -Uri https://chocolatey.org/install.ps1 -OutFile install.ps1; \
16+
.\\install.ps1; \
17+
Remove-Item install.ps1 -Force"
18+
19+
# Use Chocolatey to install Python 3.12, FFmpeg, and Git
20+
RUN powershell -Command "choco install -y python --version=3.12"
21+
RUN powershell -Command "choco install -y ffmpeg git"
22+
23+
# Set the PATH for Python
24+
RUN powershell -Command "[Environment]::SetEnvironmentVariable('Path', $Env:Path + ';C:\\Python312;C:\\Python312\\Scripts', [EnvironmentVariableTarget]::Machine)"
25+
26+
# Verify installations
27+
RUN powershell -Command " \
28+
python --version; \
29+
ffmpeg -version; \
30+
git --version"
831

932
# Install pip dependencies
1033
#RUN pip3 install --no-cache-dir -r requirements.txt
1134

1235
# Create volumes for audio cache, config, data and logs
13-
VOLUME ["musicbot/audio_cache", "musicbot/config", "musicbot/data", "musicbot/logs", "musicbot/media"]
36+
VOLUME ["/musicbot/audio_cache", "/musicbot/config", "/musicbot/data", "/musicbot/logs", "/musicbot/media"]
1437

1538
ENV APP_ENV=docker
1639

0 commit comments

Comments
 (0)