Dockerfile 541 B

1234567891011121314151617
  1. FROM python:3.12-windowsservercore
  2. WORKDIR C:/app
  3. ARG APP_VERSION=dev
  4. ENV APP_VERSION=${APP_VERSION}
  5. ENV SERVICE_PORT=2456
  6. COPY requirements.txt .
  7. RUN python -m pip install --upgrade pip && python -m pip install -r requirements.txt
  8. COPY . .
  9. RUN powershell -NoProfile -Command "Set-Content -Encoding ascii -Path C:/app/VERSION -Value $env:APP_VERSION"
  10. EXPOSE 2456
  11. CMD powershell -NoProfile -Command "Start-Process -FilePath 'C:/app/bin/pico-tcp.exe' -WorkingDirectory 'C:/app/bin'; python manage.py runserver 0.0.0.0:$env:SERVICE_PORT"