Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add Dockerfile & docker-compose.yml #242

Merged
merged 1 commit into from
Aug 26, 2023
Merged

add Dockerfile & docker-compose.yml #242

merged 1 commit into from
Aug 26, 2023

Conversation

desaster
Copy link
Owner

@desaster desaster commented Aug 2, 2023

In preparation to archiving the repository, I'm adding a Dockerfile and docker-compose.yml. This should let the software to run even with the very ancient dependencies it has.

The Dockerfile should setup a fully working environment for kippo, including optional dependencies (mysql, xmpp).

All data and configuration should be kept outside the container by using volumes. The docker-compose.yml has these volumes pointing to the usual directories in the main kippo directory.

This is based on the dockerfile by @aristofanischionis in #241 , but I ended up heavily editing it to use alpine and support docker-compose.

usage with docker

To build:

docker build -t kippo:latest .

To use:

cp kippo.cfg.dist kippo.cfg
# (and customize kippo.cfg)

docker run \
    -it \
    --rm \
    --name=kippo \
    -p 2222:2222 \
    -v $(pwd)/log:/app/log \
    -v $(pwd)/dl:/app/dl \
    -v $(pwd)/data:/app/data \
    -v $(pwd)/kippo.cfg:/app/kippo.cfg \
    kippo

usage with docker-compose

With the docker-compose.yml, kippo can be run with a single command:

docker-compose up

To start with the optional mariadb service:

docker-compose --profile with-db up

Additional notes

This doesn't seem to work too well with podman. I think it doesn't support profiles in docker-compose.yml, or the volumes pointing to a file (kippo.cfg).

The Dockerfile should setup a fully working environment for kippo,
including optional dependencies (mysql, xmpp).

To build:

  docker build -t kippo:latest .

To use:

  docker run \
      -it \
      --rm \
      --name=kippo \
      -p 2222:2222 \
      -v $(pwd)/log:/app/log \
      -v $(pwd)/dl:/app/dl \
      -v $(pwd)/data:/app/data \
      -v $(pwd)/kippo.cfg:/app/kippo.cfg \
      kippo

With the docker-compose.yml, kippo can be run with a single command:

  docker-compose up

To start with the optional mariadb service:

  docker-compose --profile with-db up

All data and configuration should be kept outside the container by using
volumes. The docker-compose.yml has these volumes pointing to the usual
directories in the main kippo directory.
@desaster desaster merged commit b9eb06a into master Aug 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant