Skip to content

Commit bfd3c3a

Browse files
committed
add dockerfile
1 parent 8c8ad6d commit bfd3c3a

File tree

10 files changed

+58
-62
lines changed

10 files changed

+58
-62
lines changed

.dockerignore

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# https://docs.docker.com/engine/reference/builder/#dockerignore-file
2+
3+
**/.DS_Store
4+
**/__pycache__
5+
**/.venv
6+
**/.classpath
7+
**/.dockerignore
8+
**/.env
9+
**/.git
10+
**/.gitignore
11+
**/.project
12+
**/.settings
13+
**/.toolstarget
14+
**/.vs
15+
**/.vscode
16+
**/*.*proj.user
17+
**/*.dbmdl
18+
**/*.jfm
19+
**/bin
20+
**/charts
21+
**/docker-compose*
22+
**/compose*
23+
**/Dockerfile*
24+
**/node_modules
25+
**/npm-debug.log
26+
**/obj
27+
**/secrets.dev.yaml
28+
**/values.dev.yaml
29+
LICENSE
30+
README.md

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ logs/
33
.env
44
src/__pycache__/*
55
data/*
6+
.idea/

.idea/.gitignore

Lines changed: 0 additions & 8 deletions
This file was deleted.

.idea/inspectionProfiles/Project_Default.xml

Lines changed: 0 additions & 22 deletions
This file was deleted.

.idea/inspectionProfiles/profiles_settings.xml

Lines changed: 0 additions & 6 deletions
This file was deleted.

.idea/misc.xml

Lines changed: 0 additions & 4 deletions
This file was deleted.

.idea/modules.xml

Lines changed: 0 additions & 8 deletions
This file was deleted.

.idea/sesame-taiga_crawler.iml

Lines changed: 0 additions & 8 deletions
This file was deleted.

.idea/vcs.xml

Lines changed: 0 additions & 6 deletions
This file was deleted.

Dockerfile

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
ARG PYTHON_VERSION=3.9.6
2+
FROM python:${PYTHON_VERSION}-slim as base
3+
4+
ENV PYTHONDONTWRITEBYTECODE=1
5+
ENV PYTHONUNBUFFERED=1
6+
7+
WORKDIR /data
8+
9+
ARG UID=10001
10+
RUN adduser \
11+
--disabled-password \
12+
--gecos "" \
13+
--home "/nonexistent" \
14+
--shell "/sbin/nologin" \
15+
--no-create-home \
16+
--uid "${UID}" \
17+
appuser
18+
19+
RUN --mount=type=cache,target=/root/.cache/pip \
20+
--mount=type=bind,source=requirements.txt,target=requirements.txt \
21+
python -m pip install -r requirements.txt
22+
23+
USER appuser
24+
25+
COPY . .
26+
27+
CMD py main.py

0 commit comments

Comments
 (0)