Update image build process
This commit is contained in:
1 parent
ca2ab10ba5
commit
06bd0cd90a
1 file changed
+5
-5
+5
-5
@@ -16,16 +16,16 @@ COPY requirements.txt .
|
|||||||
# Install Python dependencies
|
# Install Python dependencies
|
||||||
RUN pip install --no-cache-dir -r requirements.txt
|
RUN pip install --no-cache-dir -r requirements.txt
|
||||||
|
|
||||||
# Copy the rest of the application
|
|
||||||
COPY . .
|
|
||||||
|
|
||||||
# Create a non-root user
|
# Create a non-root user
|
||||||
RUN useradd -m bot
|
RUN addgroup -S bot && adduser -S bot -G bot
|
||||||
|
|
||||||
|
# Copy the rest of the application
|
||||||
|
COPY --chown=bot:bot . .
|
||||||
|
|
||||||
# Create directories for persistent storage and modify permissions
|
# Create directories for persistent storage and modify permissions
|
||||||
RUN mkdir -p logs && \
|
RUN mkdir -p logs && \
|
||||||
chown -R bot:bot logs && \
|
chown -R bot:bot logs && \
|
||||||
chmod -R 755 logs \
|
chmod -R 755 logs && \
|
||||||
mkdir -p embed && \
|
mkdir -p embed && \
|
||||||
chown -R bot:bot embed && \
|
chown -R bot:bot embed && \
|
||||||
chmod -R 755 embed \
|
chmod -R 755 embed \
|
||||||
|
|||||||
Reference in new issue
Block a user