Skip to content

Add Dockerfile for Alpine Linux and update README #137

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
---------
Expand Down