|
1 | 1 | # Use a Windows-compatible Python base image
|
2 | 2 | FROM mcr.microsoft.com/windows/servercore:ltsc2022
|
3 | 3 |
|
4 |
| -# Install Chocolatey (a lightweight package manager for Windows) |
5 |
| -RUN powershell -Command "Set-ExecutionPolicy Bypass -Scope Process -Force; \ |
6 |
| - [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; \ |
7 |
| - Invoke-WebRequest -Uri https://chocolatey.org/install.ps1 -OutFile install.ps1; \ |
8 |
| - .\\install.ps1; \ |
9 |
| - Remove-Item install.ps1 -Force" |
10 |
| - |
11 |
| -# Use Chocolatey to install Python 3.12, FFmpeg, and Git |
12 |
| -RUN powershell -Command "choco install -y python --version=3.12" |
13 |
| -RUN powershell -Command "choco install -y ffmpeg git" |
14 |
| - |
15 |
| -# Set the PATH for Python |
16 |
| -RUN powershell -Command "[Environment]::SetEnvironmentVariable('Path', $Env:Path + ';C:\\Python312;C:\\Python312\\Scripts', [EnvironmentVariableTarget]::Machine)" |
17 |
| - |
18 |
| -# Verify installations |
19 |
| -RUN powershell -Command " \ |
20 |
| - python --version; \ |
21 |
| - ffmpeg -version; \ |
22 |
| - git --version" |
23 |
| - |
24 | 4 | # Add project source
|
25 |
| -WORKDIR /musicbot |
| 5 | +WORKDIR C:/musicbot |
26 | 6 | COPY . ./
|
27 | 7 | COPY ./config sample_config
|
28 | 8 |
|
29 | 9 | # Install pip dependencies
|
30 |
| -RUN pip3 install --no-cache-dir -r requirements.txt |
| 10 | +#RUN pip3 install --no-cache-dir -r requirements.txt |
31 | 11 |
|
32 | 12 | # Create volumes for audio cache, config, data and logs
|
33 |
| -VOLUME ["C:\musicbot\audio_cache", "C:\musicbot\config", "C:\musicbot\data", "C:\musicbot\logs", "C:\musicbot\media"] |
| 13 | +VOLUME ["musicbot/audio_cache", "musicbot/config", "musicbot/data", "musicbot/logs", "musicbot/media"] |
34 | 14 |
|
35 | 15 | ENV APP_ENV=docker
|
36 | 16 |
|
|
0 commit comments