Skip to content

Commit 60e6c12

Browse files
authored
Merge pull request #18 from jan-di/debian
Switch to debian based image, second try
2 parents 41f6981 + ad250a0 commit 60e6c12

File tree

5 files changed

+43
-27
lines changed

5 files changed

+43
-27
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// Update 'VARIANT' to pick a Python version: 3, 3.10, 3.9, 3.8, 3.7, 3.6
1111
// Append -bullseye or -buster to pin to an OS version.
1212
// Use -bullseye variants on local on arm64/Apple Silicon.
13-
"VARIANT": "3.10-bullseye",
13+
"VARIANT": "3.9-bullseye",
1414
// Options
1515
"NODE_VERSION": "none"
1616
}

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Build Docker Images
33
env:
44
DOCKERHUB_TAG: 'jandi/database-backup'
55
GITHUB_TAG: 'ghcr.io/jan-di/database-backup'
6-
PLATFORMS: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64
6+
PLATFORMS: linux/amd64,linux/arm64,linux/arm/v6,linux/arm/v7
77

88
on:
99
push:

Dockerfile

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,35 @@
1-
FROM python:3.10.0-alpine3.14 AS base
1+
FROM python:3.9.7-bullseye AS base
22

33
LABEL jan-di.database-backup.instance_id="default"
44

5-
RUN set -eux; \
6-
apk --no-cache add \
5+
RUN apt-get update && apt-get install -y \
76
mariadb-client \
8-
postgresql-client \
9-
tzdata
7+
postgresql-client \
8+
tzdata \
9+
&& apt-get clean && rm -rf /var/lib/apt/lists/*
1010

1111
FROM base AS python-deps
1212

1313
RUN set -eux; \
14-
apk --no-cache add \
15-
# cryptography
16-
gcc musl-dev python3-dev libffi-dev openssl-dev cargo \
17-
; \
1814
pip install pipenv
1915

20-
COPY Pipfile .
21-
COPY Pipfile.lock .
22-
ENV CI=1 \
23-
PIPENV_VENV_IN_PROJECT=1
16+
COPY Pipfile Pipfile.lock ./
17+
2418
RUN set -eux; \
25-
pipenv install --deploy
19+
CI=1 PIPENV_VENV_IN_PROJECT=1 PIP_ONLY_BINARY=:all: \
20+
pipenv install --deploy --verbose
2621

2722
FROM base
2823

2924
COPY --from=python-deps /.venv /.venv
30-
ENV PATH="/.venv/bin:$PATH"
25+
ENV PATH="/.venv/bin:$PATH" \
26+
PYTHONUNBUFFERED=1
3127

3228
WORKDIR /app
3329

3430
RUN set -eux; \
3531
mkdir -p /dump
3632

37-
ENV PYTHONUNBUFFERED=1
38-
3933
COPY . .
4034

4135
ENTRYPOINT [ "python3", "/app/main.py" ]

Pipfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ url = "https://pypi.org/simple"
33
verify_ssl = true
44
name = "pypi"
55

6+
[[source]]
7+
url = "https://www.piwheels.org/simple"
8+
verify_ssl = true
9+
name = "piwheels"
10+
611
[packages]
712
docker = "*"
813
humanize = "*"
@@ -13,4 +18,4 @@ croniter = "*"
1318
[dev-packages]
1419

1520
[requires]
16-
python_version = "3.10"
21+
python_version = "3.9"

Pipfile.lock

Lines changed: 24 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)