FROM jupyterlab/jupyterlab:latest | |
# Set the working directory to /app | |
WORKDIR /app | |
# Copy the requirements file | |
COPY requirements.txt . | |
COPY public /app/public | |
# Install the dependencies | |
RUN pip install -r requirements.txt | |
# Copy the JupyterLab configuration file | |
COPY jupyter_config.py /etc/jupyterlab/jupyter_config.py | |
# Expose the port 8888 for JupyterLab (no se utiliza, solo para referencia) | |
EXPOSE 8888 | |
# Set the environment variables | |
ENV JUPYTERLAB_PORT=8888 | |
ENV JUPYTERLAB_TOKEN=your_secret_token | |
# Run JupyterLab when the container starts | |
CMD ["jupyter", "lab", "--port", "8888", "--no-browser", "--allow-root"] | |
# Use Nginx as a reverse proxy | |
FROM nginx:latest | |
# Copy the Nginx configuration file | |
COPY nginx.conf /etc/nginx/nginx.conf | |
# Expose the port 7860 for Nginx | |
EXPOSE 7860 | |
# Set the environment variables | |
ENV NGINX_PORT=7860 | |
# Run Nginx when the container starts | |
CMD ["nginx", "-g", "daemon off;"] | |