You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
build: multi-stage builds and testing configuration
- Introduced a new `compose.yml` file for running tests in an isolated Docker environment.
- Updated `Dockerfile` to support multi-stage builds, including a dedicated test stage with Bitcoin Core.
- Enhanced `install.sh` to allow installation of dependencies only, without building JoinMarket.
- Updated documentation to include Docker usage instructions for building images and running tests.
build: add version arguments
chore: rename script flags for consistency
chore: ignore docker files
fix: add image entrypoint
Copy file name to clipboardExpand all lines: docs/INSTALL.md
+39-6Lines changed: 39 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -265,14 +265,47 @@ There, you need to install the client code (without Joinmarket's bitcoin):
265
265
266
266
#### Docker Installation
267
267
268
-
The [Dockerfile](../Dockerfile) provided builds a minimal Docker image which can help in getting started with a custom Docker setup. An example of building and running the [wallet-tool.py](../scripts/wallet-tool.py) script:
268
+
The [Dockerfile](../Dockerfile) provided builds an optimized multi-stage Docker image for JoinMarket. The build process is optimized for layer caching and includes all necessary dependencies.
This creates a minimal production image with JoinMarket installed.
277
+
278
+
##### Running JoinMarket scripts in Docker
279
+
280
+
Example of running the [wallet-tool.py](../scripts/wallet-tool.py) script:
281
+
282
+
docker run --rm -it joinmarket bash -c "source jmvenv/bin/activate && cd scripts && python wallet-tool.py --help"
283
+
284
+
##### Running tests with Docker Compose
285
+
286
+
The repository includes a `compose.yml` file for easy testing:
287
+
288
+
docker compose up test
289
+
290
+
This will:
291
+
292
+
* Build a test image that includes Bitcoin Core 29.2
293
+
* Mount the `src` and `test` directories for development
294
+
* Run the full test suite with all dependencies configured automatically
295
+
* Use shared memory for improved test performance
296
+
297
+
##### Building custom images
298
+
299
+
The Dockerfile uses multi-stage builds with the following targets:
300
+
301
+
* `joinmarket` (default) - Production image with JoinMarket installed
302
+
* `test` - Testing image that includes Bitcoin Core binaries
303
+
304
+
You can build a specific target:
305
+
306
+
docker build --target test -t joinmarket:test .
274
307
275
-
A new Docker image can be built using `joinmarket-test` as a base using `FROM joinmarket-test`. See [Docker documentation](https://docs.docker.com/engine/reference/builder/) for more details.
308
+
See [Docker documentation](https://docs.docker.com/engine/reference/builder/) for more details on multi-stage builds.
276
309
277
310
#### Development (or making other changes to the code)
Copy file name to clipboardExpand all lines: docs/TESTING.md
+17Lines changed: 17 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,22 @@
1
1
### Test instructions (for developers):
2
2
3
+
#### Quick start: Running tests with Docker
4
+
5
+
The easiest way to run the full test suite is using Docker Compose, which handles all dependencies automatically:
6
+
7
+
docker compose run --rm test
8
+
9
+
This will:
10
+
11
+
* Build a Docker image with all dependencies (Python, Bitcoin Core 29.2, miniircd)
12
+
* Run the complete test suite in an isolated environment
13
+
* Automatically download and set up miniircd
14
+
* No need to install bitcoind or other dependencies on your host machine
15
+
16
+
For development, the Docker setup mounts the `src` and `test` directories, so you can make changes locally and re-run tests without rebuilding the image.
17
+
18
+
#### Manual setup
19
+
3
20
Work in your `jmvenv` virtual environment as for all Joinmarket work. Make sure to have [bitcoind](https://bitcoin.org/en/full-node) 29.0 or newer installed. Also need miniircd installed to the root (i.e. in your `joinmarket-clientserver` directory):
0 commit comments