├── Dockerfile ├── LICENSE ├── .github └── workflows │ └── build-and-push.yml └── README.md /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.11-slim 2 | 3 | RUN python3 -m pip install --upgrade radicale 4 | 5 | CMD ["python3", "-m", "radicale", "--storage-filesystem-folder=/radicale", "--hosts=0.0.0.0:5232"] 6 | 7 | EXPOSE 5232 -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Jintao Zhang 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /.github/workflows/build-and-push.yml: -------------------------------------------------------------------------------- 1 | on: 2 | release: 3 | types: 4 | - published 5 | push: 6 | branches: 7 | - main 8 | 9 | 10 | jobs: 11 | docker-build-push: 12 | runs-on: ubuntu-latest 13 | permissions: 14 | contents: read 15 | packages: write 16 | 17 | steps: 18 | - name: Checkout code 19 | uses: actions/checkout@v3 20 | 21 | - name: Set up Docker Buildx 22 | uses: docker/setup-buildx-action@v2 23 | 24 | - name: Login to GitHub Container Registry 25 | if: github.event_name == 'release' 26 | uses: docker/login-action@v2 27 | with: 28 | registry: ghcr.io 29 | username: ${{ github.actor }} 30 | password: ${{ secrets.GITHUB_TOKEN }} 31 | 32 | - name: Build and push Docker image 33 | uses: docker/build-push-action@v4 34 | with: 35 | context: . 36 | push: ${{ github.event_name == 'release' }} 37 | tags: | 38 | ghcr.io/${{ github.repository }}:${{ github.sha }} 39 | ghcr.io/${{ github.repository }}:${{ github.ref == 'refs/heads/main' && 'latest' || github.event.release.tag_name }} 40 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Radicale Docker Image 2 | 3 | [![.github/workflows/build-and-push.yml](https://github.com/tao12345666333/radicale/actions/workflows/build-and-push.yml/badge.svg?branch=main)](https://github.com/tao12345666333/radicale/actions/workflows/build-and-push.yml) 4 | 5 | This is a Docker image for running [Radicale](https://radicale.org/), a CalDAV and CardDAV server. 6 | 7 | ## Usage 8 | 9 | To use this image, you can run the following command: 10 | 11 | ``` 12 | docker run -p 5232:5232 -v /path/to/data:/radicale ghcr.io/tao12345666333/radicale:latest 13 | ``` 14 | 15 | This will start a Radicale server on port 5232, with data stored in the `/path/to/data` directory on the host machine. 16 | 17 | ## Configuration 18 | 19 | You can configure Radicale by passing command-line arguments to the `python3 -m radicale` command. For example, to set the logging level to debug, you can run: 20 | 21 | ``` 22 | docker run -p 5232:5232 -v /path/to/data:/radicale ghcr.io/tao12345666333/radicale:latest python3 -m radicale --storage-filesystem-folder=/radicale --hosts=0.0.0.0:5232 --logging-level=debug 23 | ``` 24 | 25 | For more information on configuring Radicale, see the [official documentation](https://radicale.org/v3.html#basic-configuration). 26 | 27 | ## License 28 | 29 | This Docker image is licensed under the [MIT License](LICENSE). 30 | --------------------------------------------------------------------------------