brand-erp / Dockerfile_old
BinaryONe
initial Commit
f9dacfc
# Use official Python 3.11 base image
FROM python:3.11-slim
# Create a non-root user
RUN useradd -ms /bin/bash admin
# Install dependencies and Node.js (18.x)
RUN apt-get update && apt-get upgrade -y && \
apt-get install -y --no-install-recommends \
ksh \
curl \
nginx \
gnupg \
certbot \
wkhtmltopdf \
build-essential \
libpq-dev \
libssl-dev \
libffi-dev \
python3-dev \
libldap2-dev \
libsasl2-dev \
python3-certbot-nginx && \
# Add Node.js 18.x from NodeSource
curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \
apt-get install -y nodejs && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Print versions (optional debug)
RUN node -v && npm -v && python3 --version && pip3 --version
# Copy application files
#COPY . /app
COPY odoo.conf requirements.txt /app/
# Copy Angular build files to Nginx web directory
ADD ./odoo.tar /app/odoo
# Set directory permissions
RUN chmod 777 /app
# Set the working directory to /app
WORKDIR /app
# Set ownership and permissions for the app directory
RUN chown -R admin:admin /app && chmod -R 777 /app/*
# Switch to the non-root user for better security
USER admin
# Expose the port the application will run on
EXPOSE 7860
# Install Python dependencies
RUN pip3 install --no-cache-dir --upgrade -r requirements.txt
# Run the Odoo server
CMD ["python3", "odoo/odoo-bin", "-c", "/app/odoo.conf"]