Skip to content

Commit dcf88e9

Browse files
committed
doc: Update nix build instructions for docker
1 parent cc2a49f commit dcf88e9

File tree

1 file changed

+7
-15
lines changed

1 file changed

+7
-15
lines changed

doc/docker.md

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ docker-compose up && docker-compose logs -f
132132
### Set folder where to download snapshot
133133

134134
The snapshot is downloaded in current working directory. Setting the working directory should allow to choose where the download is done.
135-
136135
For `docker-compose`:
137136

138137
```yaml
@@ -221,34 +220,27 @@ docker-compose down -f docker-test.yml
221220

222221
## Building Docker images with Nix
223222

224-
Assuming a base OSX machine with Nix installed. Building a Docker image for cardano-db-sync requires a
225-
Linux host to compile on. Nix provides a way to do [remote builds](https://nixos.org/manual/nix/unstable/advanced-topics/distributed-builds.html)
226-
227-
Prerequisites:
228-
* shell account on NixOS Linux machine (ask on Slack)
229-
eg. builder@x86_64-linux.example.com
223+
Building a Docker image for cardano-db-sync requires a Linux host to compile on.
230224

231225
Assuming you want a Linux x86 image run:
232226

233227
``` shell
234-
nix build .#legacyPackages.x86_64-linux.dockerImage \
235-
--builders 'ssh://builder@x86_64-linux.example.com x86_64-linux'
228+
nix build .#packages.x86_64-linux.cardano-db-sync-docker
236229
```
237230

238-
At the end it will generate a `tar.gz` file
239-
eg `/nix/store/arbrn0fs54whkn64m0wrcbl9hjd35byn-docker-image-cardano-db-sync.tar.gz`
231+
At the end it will generate a `tar.gz` file linked to `./result`
240232

241233
that can be loaded into docker and run as a normal image.
242234

243235
``` shell
244-
$ docker load -i /nix/store/arbrn0fs54whkn64m0wrcbl9hjd35byn-docker-image-cardano-db-sync.tar.gz
236+
$ docker load < result
245237

246238
$ docker image ls
247-
REPOSITORY TAG IMAGE ID CREATED SIZE
248-
inputoutput/cardano-db-sync 066b747a8bfd3791b06ea46c2e793f83ed64967f f34b029e9c5c 15 hours ago 911MB
239+
REPOSITORY TAG IMAGE ID CREATED SIZE
240+
cardano-db-sync latest a5168d8c04b9 54 years ago 1.16GB
249241

250242
# Run this as
251-
$ docker run inputoutput/cardano-db-sync:066b747a8bfd3791b06ea46c2e793f83ed64967f
243+
$ docker run cardano-db-sync
252244
```
253245

254246
## Running SMASH with docker-compose

0 commit comments

Comments
 (0)