Skip to content

Commit e442e5f

Browse files
authored
Add an Alpine test Dockerfile for development purposes (#610)
Useful to quickly test the project on Alpine. Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
1 parent 3b92458 commit e442e5f

3 files changed

Lines changed: 27 additions & 0 deletions

File tree

Dockerfile.test.alpine

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
FROM alpine:3.21
2+
RUN apk add --no-cache cmake make g++ zsh bash jq
3+
WORKDIR /src
4+
COPY CMakeLists.txt .
5+
COPY cmake cmake
6+
COPY src src
7+
COPY test test
8+
COPY vendor vendor
9+
COPY completion completion
10+
COPY VERSION VERSION
11+
COPY package.json package.json
12+
COPY package-lock.json package-lock.json
13+
COPY action.yml action.yml
14+
COPY README.markdown README.markdown
15+
RUN cmake -S . -B ./build \
16+
-DCMAKE_BUILD_TYPE:STRING=Release \
17+
-DJSONSCHEMA_TESTS:BOOL=ON
18+
RUN cmake --build ./build --config Release --parallel 4
19+
RUN cmake --install ./build --prefix ./build/dist --config Release --verbose \
20+
--component sourcemeta_jsonschema
21+
RUN cd ./build && ctest --build-config Release --output-on-failure --parallel
22+
RUN cpack --config build/CPackConfig.cmake -B build/out -C Release

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ CTEST = ctest
44
CPACK = cpack
55
NPM = npm
66
NODE = node
7+
DOCKER = docker
78

89
# Options
910
PRESET = Debug
@@ -52,5 +53,8 @@ npm-pack: node_modules .always
5253
npm-publish: npm-pack
5354
$(NPM) publish
5455

56+
alpine: .always
57+
$(DOCKER) build --progress plain --file Dockerfile.test.alpine .
58+
5559
# For NMake, which doesn't support .PHONY
5660
.always:

vendorpull.mask

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,4 @@ eslint.config.mjs
3232
package.json
3333
package-lock.json
3434
npm
35+
Dockerfile.test.alpine

0 commit comments

Comments
 (0)