Skip to content

Commit e5a9da5

Browse files
committed
add distroless to Dockerfile
1 parent a7ed560 commit e5a9da5

3 files changed

Lines changed: 14 additions & 7 deletions

File tree

.dockerignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ __pycache__/
44
config/*.txt
55
logs/*.log
66

7+
certs/*.key
8+
certs/*.pem
9+
!certs/ca/*
10+
711
tests/
812
config.ini.example
913

Dockerfile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
FROM python:3.13-slim as builder
22
WORKDIR /app
33
COPY requirements.txt .
4-
RUN pip install --no-cache-dir --prefix=/install -r requirements.txt
4+
RUN pip install --no-cache-dir -r requirements.txt
5+
COPY . .
6+
RUN chmod -R 777 /app/logs
7+
RUN chmod -R 777 /app/config
58

69

7-
FROM python:3.13-slim
8-
RUN useradd -m -s /bin/bash pyproxy
10+
FROM gcr.io/distroless/python3-debian12:nonroot
911
WORKDIR /app
10-
COPY --from=builder /install /usr/local
11-
COPY . .
12-
RUN chown -R pyproxy:pyproxy /app
13-
USER pyproxy
12+
COPY --from=builder /usr/local /usr/local
13+
COPY --from=builder /app /app
1414
EXPOSE 8080
1515
ENTRYPOINT ["python3", "pyproxy.py"]

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ If you encounter any problems, or if you want to use the program in a particular
8585
- Proxy authentication
8686
- Benchmark
8787
- Admin mode, statistiques and real time request
88+
- Image slim wihtout admin interface
8889
- Custom header
90+
- Fix HSTS
91+
- Wiki ssl inspection (volume certs/ca...)
8992

9093
---

0 commit comments

Comments
 (0)