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

stellar/stellar-horizon docker image should use Captive-Core #4006

Closed
bartekn opened this issue Oct 12, 2021 · 5 comments · Fixed by #4019
Closed

stellar/stellar-horizon docker image should use Captive-Core #4006

bartekn opened this issue Oct 12, 2021 · 5 comments · Fixed by #4019
Assignees

Comments

@bartekn
Copy link
Contributor

bartekn commented Oct 12, 2021

Dockerfile describing stellar/horizon image does not use Captive-Core (does not even have stellar-core installed). It seems it's implemented in Dockerfile.dev so likely we just need to move code.

@2opremio
Copy link
Contributor

stellar/horizon seems to be built using Dockerfile.dev and not Dockerfile. See

go/.circleci/config.yml

Lines 361 to 375 in 50b38f6

publish_horizon_docker_image:
docker:
- image: docker:18.04-git
steps:
- checkout
- setup_remote_docker
- run:
name: Build and Push Docker image
command: |
echo "$DOCKER_PASS" | docker login -u "$DOCKER_USER" --password-stdin
# CIRCLE_TAG will be prefixed by "horizon-v", here we build the horizon docker image and tag it with stellar/horizon:$VERSION
# where version is CIRCLE_TAG without the "horizon-v" prefix
VERSION=${CIRCLE_TAG#horizon-v}
docker build -f services/horizon/docker/Dockerfile.dev -t stellar/horizon:$VERSION .
docker push stellar/horizon:$VERSION

So, it seems that the Dockerfile is not used at all. I would suggest:

  1. Updating the Dockerfile to install stellar-core
  2. Updating our build pipeline to use the Dockerfile

@bartekn thoughts?

@2opremio
Copy link
Contributor

Or we could simply remove the Dockerfile since the stellar/horizon images use captive core already.

@bartekn
Copy link
Contributor Author

bartekn commented Oct 13, 2021

So, it seems that the Dockerfile is not used at all. I would suggest:

  1. Updating the Dockerfile to install stellar-core
  2. Updating our build pipeline to use the Dockerfile

I think we should do this and remove Dockerfile.dev because it's confusing.

@2opremio
Copy link
Contributor

2opremio commented Oct 14, 2021

Dockerfile.dev uses a locally built horizon binary as opposed to released debian packages, so we need it for the integration tests.

Unless you meant we should remove the existing Dockerfile and rename Dockerfile.dev to Dockerfile. However, this would imply to keep releasing an image with a horizon binary in the root folder as opposed to using debian packages (which is what we are doing today anyhow)

@2opremio
Copy link
Contributor

2opremio commented Oct 15, 2021

It seems I didn't have all the information about how the Dockerfiles are used. I think the current state of affairs is:

  • Dockerfile is used by Jenkins to build and publish thestellar/stellar-horizon docker image. The image installs Horizon using debian packages, but it doesn't seem to install stellar core.

  • Dockerfile.dev is used for integration tests and by CircleCI to publish the stellar/horizon docker image. The image installs Horizon by building it locally and copying it to the image, it contains stellar core.

The plan seems to be to:

  1. Make stellar/stellar-horizon the official image and stop publishing stellar/horizon. This means we should remove the docker push stellar/horizon jobs from CircleCI. However, we should first ascertain stellar/horizon isn't used.
  2. Incorporate stellar core to stellar/stellar-horizon

CC @tamirms @jacekn

@2opremio 2opremio changed the title stellar/horizon docker image should use Captive-Core stellar/stellar-horizon docker image should use Captive-Core Oct 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants