Skip to content
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

Rework Dockerfile in multi-stages and provide a stage where cardano-node & ogmios are bundled together #58

Merged
merged 9 commits into from
May 20, 2021

Conversation

KtorZ
Copy link
Member

@KtorZ KtorZ commented May 15, 2021

Fixes #44


  • 4fea04a
    📍 Rework Dockerfile in multi-stages and provide a stage where cardano-node & ogmios are bundled together
    One can still fallback to the previous behavior by running 'docker build . --target ogmios'; The full build now however also builds a cardano-node.

  • 362bbdd
    📍 Adjust Dockerfile to use cabal only, and pre-build Ogmios during the setup.

  • b98ba18
    📍 Fix ARG / scheme for cardano-node-ogmios build stage

  • ac06142
    📍 Add more debug capabilities to wait-for-sync script.

  • 96f1ad8
    📍 Fix Dockerlint warnings & errors.

  • 69401b5
    📍 Add workflow to build and push Docker images using github actions (instead of docker hub)

  • c4838bc
    📍 Include instructions about building/running standalone cardano-node-ogmios in the user-guide.

@KtorZ KtorZ requested a review from rhyslbw May 15, 2021 22:07
@KtorZ KtorZ self-assigned this May 15, 2021
Copy link
Member

@rhyslbw rhyslbw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure we can restrict Dockerhub builds to a specific build target so we might as well disable builds in Dockerhub and do everything with Github actions.

Looks like you can do it with custom build hooks

@KtorZ
Copy link
Member Author

KtorZ commented May 19, 2021

So, this now work fine:

$ docker build --target ogmios .
$ docker build --target cardano-ogmios-node .

In the case of the latter, one can then:

$ docker run --rm --name cardano-node-ogmios -e NETWORK=testnet -p 1337:1337 ...

which starts Ogmios + a node. Works with mainnet, testnet and staging aaaaand, seems like the node is syncing fine (after struggling a good bit, finally found out that the runtime image needs to have netbase installed without what the node fails to subscribe to its peers).

I still need to adjust the user manual and maybe some bits in the CI accordingly but, it's mostly there 🐳

KtorZ added 2 commits May 19, 2021 20:01
…ode & ogmios are bundled together

  One can still fallback to the previous behavior by running 'docker build . --target ogmios'; The full build now however also builds a cardano-node.
@KtorZ KtorZ force-pushed the KtorZ/44/cardano-node-ogmios-docker branch from 5769470 to 362bbdd Compare May 19, 2021 18:01
@KtorZ KtorZ marked this pull request as ready for review May 19, 2021 18:01
@KtorZ KtorZ force-pushed the KtorZ/44/cardano-node-ogmios-docker branch 3 times, most recently from 2df7566 to 371a65f Compare May 19, 2021 20:30
@KtorZ KtorZ force-pushed the KtorZ/44/cardano-node-ogmios-docker branch from 371a65f to c4838bc Compare May 19, 2021 21:19
@rhyslbw rhyslbw self-requested a review May 20, 2021 04:59
docs/content/getting-started/docker.md Outdated Show resolved Hide resolved
docs/content/getting-started/docker.md Outdated Show resolved Hide resolved
docs/content/getting-started/docker.md Outdated Show resolved Hide resolved
```console
$ docker build --target cardano-node-ogmios --tag ktorz/cardano-node-ogmios:latest .
```

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that this is the default build target for the image, but --target cardano-node-ogmios can be set explicitly

docs/content/getting-started/docker.md Outdated Show resolved Hide resolved
docs/content/getting-started/docker.md Outdated Show resolved Hide resolved
@rhyslbw rhyslbw self-requested a review May 20, 2021 06:00
KtorZ added 2 commits May 21, 2021 00:09
  - Make the separation between ogmios and cardano-node-ogmios clearer
  - Give better run instructions, and build instructions
  - Review general grammar and wording
  The main rationale is that having it scoped in sub-directory is more painful than useful and causes issue with tools, in particular the docker buildkit.
@KtorZ KtorZ force-pushed the KtorZ/44/cardano-node-ogmios-docker branch from 61f2fca to 2497f51 Compare May 20, 2021 22:20
@KtorZ KtorZ merged commit 42d363b into master May 20, 2021
@KtorZ KtorZ deleted the KtorZ/44/cardano-node-ogmios-docker branch May 20, 2021 23:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bundle cardano-node into the Ogmios Docker image
2 participants