Skip to content

Commit 29d7e8d

Browse files
committedJul 19, 2024
feat: add docker-compose files
docker-compose build docker-compose run sync
1 parent d684f34 commit 29d7e8d

File tree

3 files changed

+33
-0
lines changed

3 files changed

+33
-0
lines changed
 

‎.dockerignore

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
*.pyc
2+
*.pyd
3+
*.pyo
4+
.git
5+
.venv
6+
**/__pycache__
7+
config.ini
8+
clones

‎Dockerfile

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
FROM python:3.12-slim
2+
3+
WORKDIR /app
4+
5+
RUN groupadd --gid 10001 app \
6+
&& useradd -m -g app --uid 10001 -s /usr/sbin/nologin app
7+
8+
RUN apt-get update && \
9+
apt-get install --yes git && \
10+
apt-get -q --yes autoremove && \
11+
apt-get clean && \
12+
rm -rf /root/.cache
13+
14+
# Copy local code to the container image.
15+
COPY . /app
16+
17+
RUN pip install -U pip pytest
18+
USER app
19+
RUN pip install -e .

‎docker-compose.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
services:
2+
sync:
3+
build: .
4+
environment:
5+
GITHUB_ACTIONS: "true"
6+
command: ['pytest', 'tests']

0 commit comments

Comments
 (0)
Failed to load comments.