/docker-mirakc

Dockerfiles for mirakc

Primary LanguageDockerfileApache License 2.0Apache-2.0

DO NOT USE THIS REPOSITORY ANYMORE

This repository has been merged into mirakc.

See https://github.com/masnagam/mirakc#build-a-custom-docker-image.

Dockerfile for mirakc

ci-status Docker Pulls

Build images

For amd64 machine:

$ docker build .

Cross-build for ROCK64:

$ ./build arm64

Build with BuildKit:

$ DOCKER_BUILDKIT=1 ./build arm64

The build script creates a Docker image for the arm64 architecture. The image is named and tagged with $(id -un)/mirakc:arm64.

An image contains the following executables:

When running the build script, the executables above are cross-compiled with a cross-compiler instead of compiling them with the QEMU user mode emulation, in order to reduce the build time. Compiling with the QEMU user mode emulation can simplify Dockerfile.cross and makes it possible to reuse Dockerfile for cross-building images probably. But it's very slow even when running on a powerful PC.

Dockerfile and Dockerfile.cross uses multi-stage builds for compiling the executables. The multi-stage builds creates untagged intermediate images like below:

$ docker images --format "{{.Repository}}:{{.Tag}}"
masnagam/mirakc:arm64
<none>:<none>
...

The following command removes all untagged images including the intermediate images:

$ docker images -f dangling=true -q | xargs docker rmi

The following command transfers the created image to a remote docker daemon which can be accessed using SSH:

$ docker save $(id -un)/mirakc:arm64 | docker -H ssh://remote load

Launch a mirakc Docker container using docker-compose

See docker-compose.yml and sample-mirakc-config.yml.

Build a custom Docker image

A custom Docker image for the linux/arm64 architecture can be built with the following Dockerfile:

FROM masnagam/mirakc:arm64
...

Images for the following architectures have been uploaded to DockerHub.

  • masnagam/mirakc:amd64 (linux/amd64)
  • masnagam/mirakc:armv5 (linux/arm/v5)
  • masnagam/mirakc:armv7 (linux/arm/v7)
  • masnagam/mirakc:arm64 (linux/arm64)

Consult Dockerfile.cross if you like to build a Docker image for an architecture other than the above.

Performance

  • Consume about 30MB when launching a mirakc container on ROCK64
  • See README.md in the mirakc GitHub repository for details of the latest performance comparison with Mirakurun

License

Licensed under either of

at your option.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.