STAM fa1ee8ee58
april update pack - part 1
* updated:
    * python,
    * php,
    * flutter,
    * nodejs,
    * jdk,
    * go,
    * teamcity,
    * gitlab
* added:
    * openssl 3.5.0,
    * android-sdk,
    * cmake,
    * qbittorrent
    * clang
2025-04-12 23:37:28 +03:00

73 lines
2.7 KiB
Docker

##################################################################
##################################################################
##################################################################
# Build stage
##################################################################
##################################################################
##################################################################
FROM hub.epicm.org/epicmorg/python:3.10-develop AS build
ARG FREEGPT_VERSION=1.3.2
ENV FREEGPT_PATH=/app
ENV FREEGPT_PORT=1338
ENV FREEGPT_ENDPOINT_PORT=1337
RUN git clone --depth 1 --branch ${FREEGPT_VERSION} https://github.com/Em1tSan/freegpt-webui-ru.git ${FREEGPT_PATH} && \
rm -rfv ${FREEGPT_PATH}/.git
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
libffi-dev cmake \
libcurl4-openssl-dev && \
pip3 install --user --no-cache-dir -r ${FREEGPT_PATH}/requirements-docker.txt
RUN find ${FREEGPT_PATH} -type f -exec dos2unix -k -s -o {} ';'
##################################################################
##################################################################
##################################################################
# Production stage
##################################################################
##################################################################
##################################################################
FROM hub.epicm.org/epicmorg/python:3.10 AS production
ENV FREEGPT_PATH=/app
ENV FREEGPT_PORT=1338
ENV FREEGPT_ENDPOINT_PORT=1337
RUN mkdir -p ${FREEGPT_PATH}
##################################################################
# Setup supervisord
##################################################################
RUN apt-get update && \
apt-get install -y \
supervisor
COPY etc/supervisor/conf.d/freegpt.conf /etc/supervisor/conf.d/freegpt.conf
##################################################################
# Copy bins
##################################################################
COPY --from=build /root/.local /usr/local
COPY --from=build /app ${FREEGPT_PATH}
##################################################################
# cleaninig up
##################################################################
RUN apt-get clean -y && \
apt-get clean all -y && \
apt-get autoclean -y && \
rm -rfv /var/lib/apt/lists/* && \
rm -rfv /var/cache/apt/archives/*.deb && \
rm -rfv /root/tmp/* && \
rm -rfv /tmp/*
WORKDIR ${FREEGPT_PATH}
EXPOSE ${FREEGPT_PORT} ${FREEGPT_ENDPOINT_PORT}
CMD ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisor/conf.d/freegpt.conf"]