Update image build process
Some checks failed
Docker Build and Push / build-and-push (push) Failing after 51s
Some checks failed
Docker Build and Push / build-and-push (push) Failing after 51s
This commit is contained in:
14
dockerfile
14
dockerfile
@@ -19,13 +19,19 @@ RUN pip install --no-cache-dir -r requirements.txt
|
||||
# Copy the rest of the application
|
||||
COPY . .
|
||||
|
||||
# Create a non-root user and switch to it
|
||||
# Create a non-root user
|
||||
RUN useradd -m bot
|
||||
USER bot
|
||||
|
||||
# Create directories for persistent storage and modify permissions
|
||||
RUN mkdir -p /app/logs && chmod -R 777 /app/logs
|
||||
RUN mkdir -p /app/embed && chmod -R 777 /app/embed
|
||||
RUN mkdir -p logs && \
|
||||
chown -R bot:bot logs && \
|
||||
chmod -R 755 logs \
|
||||
mkdir -p embed && \
|
||||
chown -R bot:bot embed && \
|
||||
chmod -R 755 embed \
|
||||
|
||||
# Switch to non root user
|
||||
USER bot
|
||||
|
||||
# Set environment variables for configuration
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
|
Reference in New Issue
Block a user