Skip to content

Commit f255d5d

Browse files
authored
Adds a dockerfile to locally debug the CI (#1445)
1 parent 66a8c01 commit f255d5d

File tree

2 files changed

+53
-0
lines changed

2 files changed

+53
-0
lines changed

.dockerignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
.git
2+
.github
3+
.dockerignore
4+
.DS_Store
5+
tests/nimdep/vendor/
6+
tests/vendor/
7+
tests/git*
8+
nimbledeps
9+
**/csources_v2/
10+
**/*.o
11+
**/*.a
12+
**/*.so
13+
**/*.dll
14+
**/*.dylib
15+

tests/Dockerfile.debug

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
FROM nimlang/nim:alpine
2+
3+
# Install git (needed for nimble operations)
4+
RUN apk add --no-cache git
5+
6+
# Set working directory
7+
WORKDIR /nimble
8+
9+
# Copy source code
10+
COPY . .
11+
12+
# Initialize git repository and make an initial commit
13+
# This is needed for the sync file functionality in develop mode
14+
RUN git init && \
15+
git config user.name "Docker Test" && \
16+
git config user.email "[email protected]" && \
17+
git add . && \
18+
git commit -m "Initial commit for testing"
19+
20+
# Initialize git submodules (needed for vendor dependencies)
21+
RUN git submodule update --init
22+
23+
# Build nimble
24+
RUN nim c -d:release src/nimble.nim
25+
26+
# Set environment for testing
27+
ENV PATH="/nimble/src:$PATH"
28+
29+
# Default command to run the specific failing test
30+
# CMD ["./src/nimble", "test", "requires flag::should be able to install a special version"]
31+
# CMD ["./src/nimble", "build"]
32+
# CMD ["./src/nimble", "test", "lock file::"]
33+
# CMD ["./src/nimble", "test", "issues::issue 801"]
34+
# CMD ["./src/nimble", "test"]
35+
CMD ["./src/nimble", "test", "uninstall::can uninstall"]
36+
# CMD ["./src/nimble", "test", "SAT solver::"]
37+
38+
# docker build -f tests/Dockerfile.debug -t nimble-debug . && docker run --rm nimble-debug

0 commit comments

Comments
 (0)