34 lines
701 B
Docker
34 lines
701 B
Docker
ARG BUILD_FROM
|
|
FROM $BUILD_FROM
|
|
|
|
# Set shell
|
|
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
|
|
|
# Install required packages
|
|
RUN echo 'http://dl-cdn.alpinelinux.org/alpine/v3.16/main' >> /etc/apk/repositories && \
|
|
echo 'http://dl-cdn.alpinelinux.org/alpine/v3.16/community' >> /etc/apk/repositories && \
|
|
apk update && \
|
|
apk add --no-cache \
|
|
python3 \
|
|
py3-pip \
|
|
py3-wheel \
|
|
gcc \
|
|
python3-dev \
|
|
musl-dev
|
|
|
|
# Set working directory
|
|
WORKDIR /app
|
|
|
|
# Copy files
|
|
COPY requirements.txt .
|
|
COPY . .
|
|
|
|
# Install Python requirements
|
|
RUN pip3 install --no-cache-dir -r requirements.txt
|
|
|
|
# Expose the port used for the web interface
|
|
EXPOSE 8099
|
|
|
|
# Start the app
|
|
CMD ["python3", "main.py"]
|