Skip to content

Commit

Permalink
feat: reduce final build size
Browse files Browse the repository at this point in the history
  • Loading branch information
proffapt committed Jul 11, 2024
1 parent 9887684 commit 317d4b7
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
16 changes: 8 additions & 8 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ services:
container_name: mftp
command: $MFTP_MODE
volumes:
- $MFTP_CONFIG/env.py:/mftp/env.py
- $MFTP_CONFIG/token.json:/mftp/token.json
- $MFTP_CONFIG/credentials.json:/mftp/credentials.json
- $MFTP_CONFIG/mail_send_token.json:/mftp/mail_send_token.json
- $MFTP_CONFIG/mail_send_creds.json:/mftp/mail_send_creds.json
- $MFTP_CONFIG/.lsnif:/mftp/.lsnif
- $MFTP_CONFIG/.session:/mftp/.session
- $MFTP_CONFIG/env.py:/app/env.py
- $MFTP_CONFIG/token.json:/app/token.json
- $MFTP_CONFIG/credentials.json:/app/credentials.json
- $MFTP_CONFIG/mail_send_token.json:/app/mail_send_token.json
- $MFTP_CONFIG/mail_send_creds.json:/app/mail_send_creds.json
- $MFTP_CONFIG/.lsnif:/app/.lsnif
- $MFTP_CONFIG/.session:/app/.session

mftp-doctor:
build:
Expand All @@ -27,4 +27,4 @@ services:
command: ${DOCTOR_MODE:-}
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- $DOCTOR_CONFIG/env.py:/mftp-doctor/env.py
- $DOCTOR_CONFIG/env.py:/app/env.py
10 changes: 5 additions & 5 deletions mftp-doctor/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# Base image of python v3.11.8
FROM python:3.11.8
# Base image of python v3.11.9
FROM python:3.11.9-slim

# Configure IST timezone
ENV TZ="Asia/Kolkata"

# Setup the working directory as /mftp-doctor
WORKDIR /mftp-doctor
# Setup the working directory as /app
WORKDIR /app

# Get requirements file into container
COPY requirements.txt .

# Install the rquirements
RUN pip3 install -r requirements.txt
RUN pip install --no-cache-dir -r requirements.txt

# Copy mftp-doctor.py script
COPY mftp-doctor.py .
Expand Down
10 changes: 5 additions & 5 deletions mftp/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# Base image of python v3.11.8
FROM python:3.11.8
# Base image of python v3.11.9-slim
FROM python:3.11.9-slim

# Configure IST timezone
ENV TZ="Asia/Kolkata"

# Setup the working directory as /mftp
WORKDIR /mftp
# Setup the working directory as /app
WORKDIR /app

# Get requirements file into container
COPY requirements.txt .

# Install the rquirements
RUN pip3 install -r requirements.txt
RUN pip install --no-cache-dir -r requirements.txt

# Copy codebase
COPY . .
Expand Down

0 comments on commit 317d4b7

Please sign in to comment.