Skip to content

Commit

Permalink
chore: upgrade to Alpine 3.19.1 (#141)
Browse files Browse the repository at this point in the history
* chore: upgrade to Alpine 3.19.1

* doc: update CHANGELOG.md

* doc: fix typo

* chore: upgrade testinfra to pytest-testinfra

* feat: install python modules in venv as required by alpine 3.9

* perf: remove superfluous layer by concatenating instructions

* refactor: use /venv instead of /app/venv
  • Loading branch information
tomsquest authored Mar 25, 2024
1 parent 9c634bf commit 44e47df
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 37 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,17 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [3.1.9.1] - 2024-03-18

## Changed

- [Update to Alpine 3.19.1 from 3.18.2](https://github.com/tomsquest/docker-radicale/pull/141)

## [3.1.9.0] - 2024-03-18

## Changed

- [Update to Radicale 3.1,9](https://github.com/tomsquest/docker-radicale/pull/139)
- [Update to Radicale 3.1.9](https://github.com/tomsquest/docker-radicale/pull/139)

## [3.1.8.3] - 2023-07-16

Expand Down
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.18.2
FROM alpine:3.19.1

ARG COMMIT_ID
ENV COMMIT_ID ${COMMIT_ID}
Expand Down Expand Up @@ -40,8 +40,8 @@ RUN apk add --no-cache --virtual=build-dependencies \
python3 \
py3-tz \
py3-pip \
&& python3 -m pip install --upgrade pip \
&& python3 -m pip install radicale==$VERSION passlib[bcrypt] \
&& python -m venv /venv \
&& /venv/bin/pip install --no-cache-dir radicale==$VERSION passlib[bcrypt] \
&& apk del --purge build-dependencies \
&& addgroup -g $BUILD_GID radicale \
&& adduser -D -s /bin/false -H -u $BUILD_UID -G radicale radicale \
Expand All @@ -58,4 +58,4 @@ EXPOSE 5232

COPY docker-entrypoint.sh /usr/local/bin
ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["radicale", "--config", "/config/config"]
CMD ["/venv/bin/radicale", "--config", "/config/config"]
2 changes: 1 addition & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ name = "pypi"
[packages]

[dev-packages]
testinfra = "*"
pytest = "*"
pytest-testinfra = "*"

[requires]
python_version = "3.11"
32 changes: 4 additions & 28 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ if [ "$(id -u)" = "0" ] && [ "$TAKE_FILE_OWNERSHIP" = "true" ]; then
fi

# Run radicale as the "radicale" user or any other command if provided
if [ "$(id -u)" = "0" ] && [ "$1" = "radicale" ]; then
if [ "$(id -u)" = "0" ] && [ "$1" = "/venv/bin/radicale" ]; then
exec su-exec radicale "$@"
else
exec "$@"
Expand Down
2 changes: 1 addition & 1 deletion test_image_custom_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def test_port(host):
assert host.socket('tcp://0.0.0.0:5232').is_listening

def test_version(host):
assert host.check_output('radicale --version') == '3.0.0'
assert host.check_output('/venv/bin/radicale --version') == '3.0.0'

def test_user(host):
user = 'radicale'
Expand Down
2 changes: 1 addition & 1 deletion test_image_prod.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def test_port(host):


def test_version(host):
assert host.check_output('radicale --version') == '3.1.9'
assert host.check_output('/venv/bin/radicale --version') == '3.1.9'


def test_user(host):
Expand Down

0 comments on commit 44e47df

Please sign in to comment.