From 61cee01a222917ff2f53a47a2af628a38d999e74 Mon Sep 17 00:00:00 2001 From: ynggny <49854149+ynggny@users.noreply.github.com> Date: Wed, 2 Aug 2023 17:05:47 +0000 Subject: [PATCH] Add Dockerfile for Alpine Linux and update README --- Dockerfile | 10 ++++++++++ README.md | 22 ++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..c2c1463 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,10 @@ +FROM alpine:latest + +RUN apk add --no-cache \ + build-base \ + pkgconfig \ + sdl12-compat-dev \ + libjpeg-turbo-dev \ + libpng-dev + +WORKDIR /quirc diff --git a/README.md b/README.md index 6c7c850..ee38724 100644 --- a/README.md +++ b/README.md @@ -263,6 +263,28 @@ make CFLAGS="-DQUIRC_MAX_REGIONS=65534" setting `QUIRC_FLOAT_TYPE=float` and the compiler supports C99 or later language standard. +Building with Docker +-------------------- + +To build the library and associated demos/tests using Docker, you can use the provided Dockerfile. The Dockerfile installs the necessary build dependencies for Alpine Linux. To build the quirc library and demos/tests, follow these steps: + +1. Make sure you have Docker installed on your system. + +2. Clone the quirc repository to your local machine. + +3. Open a terminal or command prompt and navigate to the quirc directory. + +4. Build the Docker image with the following command: + + ```docker build -t quirc_build .``` + +5. Once the Docker image is built, you can run a container from it with the following command: + + ```docker run --rm -it --name quirc_build_container -v $PWD:/quirc quirc_build sh -c "make"``` + +By following these steps, you can build the quirc library and demos/tests using Docker, which provides a reproducible and isolated build environment. + +Please note that this Dockerfile is designed for Alpine Linux. If you are using a different Linux distribution, you may need to adjust the package names in the Dockerfile accordingly. Copyright ---------