File: Dockerfile

package info (click to toggle)
podman-compose 1.5.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,004 kB
  • sloc: python: 10,946; sh: 107; javascript: 48; makefile: 13
file content (30 lines) | stat: -rw-r--r-- 683 bytes parent folder | download | duplicates (2)
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
# Use a base image with necessary build tools
FROM python:3.11-slim AS builder

# Install required packages for building
RUN apt-get update && apt-get install -y \
    gcc \
    musl-dev \
    build-essential \
    python3-dev \
    && apt-get clean \
    && rm -rf /var/lib/apt/lists/*

# Set the working directory
WORKDIR /app

# Copy the application code
COPY . .

# Install PyInstaller
RUN pip install pyinstaller
RUN pip install -r requirements.txt

# Create a binary with PyInstaller
RUN pyinstaller --onefile --clean podman_compose.py

# Create /result dir in case it is not mounted
RUN mkdir -p /result

# Export binary
RUN cp /app/dist/podman_compose /result/podman-compose