|
2 | 2 | FROM mcr.microsoft.com/windows/servercore:ltsc2022
|
3 | 3 |
|
4 | 4 | # Add project source
|
5 |
| -WORKDIR ./musicbot |
| 5 | +WORKDIR /musicbot |
| 6 | +RUN mkdir audio_cache |
| 7 | +RUN mkdir media |
| 8 | +RUN mkdir logs |
6 | 9 | 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" |
8 | 31 |
|
9 | 32 | # Install pip dependencies
|
10 | 33 | #RUN pip3 install --no-cache-dir -r requirements.txt
|
11 | 34 |
|
12 | 35 | # 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"] |
14 | 37 |
|
15 | 38 | ENV APP_ENV=docker
|
16 | 39 |
|
|
0 commit comments