binary1ne/ADDC
0
1# Use Alpine as the base image2FROM python:3.10-alpine3 4# Install system dependencies and libraries required for Samba, LDAP, Webmin, and Gradio5RUN apk update && apk add --no-cache \6 bash \7 perl \8 samba \9 libsasl \10 libldap \11 openldap-dev \ 12 libressl-dev \13 build-base \14 python3-dev \15 libffi-dev \16 gcc \17 musl-dev \18 openldap-dev \ 19 samba-client \ 20 && pip install --no-cache-dir \21 gradio \22 ldap3 \23 smbprotocol 24 25# Install Webmin (manually as it isn't available in Alpine's package manager)26RUN apk add --no-cache wget && \27 wget https://github.com/webmin/webmin/releases/download/1.979/webmin-1.979.tar.gz && \28 tar -xvzf webmin-1.979.tar.gz && \29 cd webmin-1.979 && \30 ./setup.sh /usr/local/webmin && \31 rm -rf /webmin-1.979 /webmin-1.979.tar.gz32 33# Create the directory for the app34WORKDIR /app35 36# Copy the Gradio app code into the container37COPY gradio_app.py /app/gradio_app.py38 39# Expose required ports: Webmin (10000), Gradio (7860), and Samba (445)40EXPOSE 7860 10000 44541 42# Provision Samba Domain (optional)43RUN samba-domain-provision44 45# Add a script to manage Samba, Webmin, and Gradio46COPY start.sh /start.sh47RUN chmod +x /start.sh48 49# Start Samba, Webmin, and Gradio50CMD ["/start.sh"]51 