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

refactor Dockerfile #781

Merged
merged 1 commit into from
Apr 22, 2015
Merged

refactor Dockerfile #781

merged 1 commit into from
Apr 22, 2015

Conversation

caktux
Copy link
Contributor

@caktux caktux commented Apr 22, 2015

Following discussion in #747, reduces size to ~350 MB, saving 811 MB over the original size. Also using supervisord for a more manageable container. Logs are sent to /var/log/geth.log and /var/log/geth.err within the container.

@fjl
Copy link
Contributor

fjl commented Apr 22, 2015

                                                                                  I like the small image, but dislike the addition of unattended-upgrades and ‎supervisord. Users need direct control of the command line arguments to geth. In fact, the system-testing project depends on this in their scripts. This is not negotiable. Please change‎ these two things, then we can merge. 

@caktux
Copy link
Contributor Author

caktux commented Apr 22, 2015

System-testing shouldn't depend on the end-user docker image. I just checked how the image was being used, and the ENTRYPOINT is already being overridden, so using supervisor has no incidence. What does is that there is no longer a GOPATH, nor a git checkout, so it needs its own image anyway. Not only that, but I'll be assisting on that project shortly to clean things up, and probably move to using Docker Machine. So take back your not negotiable; it has to be fixed properly another way.

@caktux
Copy link
Contributor Author

caktux commented Apr 22, 2015

Updated the system-testing repo to account for this change, but will most probably create a different build for it later on.
The unattended-upgrades package is necessary for long-running containers, supervisor allows to debug a process that failed, and users always have the option the override the entrypoint and cmd as they see fit.

caktux added a commit that referenced this pull request Apr 22, 2015
@caktux caktux merged commit 5f6c883 into ethereum:develop Apr 22, 2015
@fjl
Copy link
Contributor

fjl commented Apr 22, 2015

I was about to write that we care about users being able to use the interactive console as well. And ask about why on earth system-testing (or anyone) would need a git checkout and a set GOPATH in the container.

@fjl fjl mentioned this pull request Apr 22, 2015
@fjl
Copy link
Contributor

fjl commented Apr 22, 2015

I have reverted your PR because we need to agree on things before anything can be merged.

@fjl
Copy link
Contributor

fjl commented Apr 22, 2015

system-testing uses the container from our repo to call various geth subcommands, see here for an example. AFAIK this use will break when the entry point changes to run supervisord instead.

@fjl
Copy link
Contributor

fjl commented Apr 22, 2015

The Dockerfile that you updated in system-testing is for cmd/bootnode. We should either create another one for it or put the old Dockerfile which compiles go-ethereum into system-testing and base the bootnode one off that.

@caktux
Copy link
Contributor Author

caktux commented Apr 22, 2015

The command line argument just needs to be updated to override the entrypoint and cmd, that's it.

@fjl
Copy link
Contributor

fjl commented Apr 22, 2015

That would fix system testing. But the main question I'd like to resolve is who the Dockerfile in our repo is for.

@fjl
Copy link
Contributor

fjl commented Apr 22, 2015

Adding supervisord and the other changes to make it more manageable assume that this container is supposed to run on a server for a long time.

@caktux
Copy link
Contributor Author

caktux commented Apr 22, 2015

We agreed earlier it was for end-users, hence using supervisor by default.

@fjl
Copy link
Contributor

fjl commented Apr 22, 2015

But who are those end users you think of?

@caktux
Copy link
Contributor Author

caktux commented Apr 22, 2015

Whoever wants to quickly try ethereum, either locally or running it for long periods of time on a server, this caters to both.

@caktux
Copy link
Contributor Author

caktux commented Apr 22, 2015

It also doesn't prevent its use in system-testing, at all, besides a few adjustments. And as I said earlier, and you seem to agree on that too, a different Dockerfile would be better suited.

@caktux
Copy link
Contributor Author

caktux commented Apr 22, 2015

Now can you please revert your revert? It didn't fix anything for one, and I'm making the necessary adjustments to system-testing.

@fjl
Copy link
Contributor

fjl commented Apr 22, 2015

At this point, the only thing I'm worried about is people not being able to use geth console and geth js easily. From reading about it more, it seems as if your container still allows that using

$ docker run -t -i -entrypoint="/usr/bin/geth console" ethereum/client-go

With the old container, that one was:

$ docker run -t -i ethereum/client-go console

I think this use of the container should be supported.

@fjl
Copy link
Contributor

fjl commented Apr 22, 2015

Can you confirm that this still works? It doesn't really matter how long the command is.

@caktux
Copy link
Contributor Author

caktux commented Apr 22, 2015

That'd be docker run -it --entrypoint="/usr/bin/geth" ethereum/client-go console

@fjl
Copy link
Contributor

fjl commented Apr 22, 2015

cool

@fjl
Copy link
Contributor

fjl commented Apr 22, 2015

Now we can merge it.

@caktux
Copy link
Contributor Author

caktux commented Apr 22, 2015

Thank you

@chpio
Copy link

chpio commented Jun 26, 2015

Im getting now the error msg: System error: exec: "\"geth\"": executable file not found in $PATH

my docker-compose.yaml file:

main:
  image: ethereum/client-go
  restart: on-failure
  volumes:
    - ./data:/root/.ethereum
  command: --nat "extip:$myPublicIp" --rpc --rpcaddr="0.0.0.0" --rpccorsdomain="*" --maxpeers 100 --natspec
  ports:
    - "30303:30303"
    - "8545:8545"
  entrypoint: geth

i will investigate this problem when im at home again.

ps: i also dislike the "nice" supervisord idea.

tony-ricciardi pushed a commit to tony-ricciardi/go-ethereum that referenced this pull request Jan 20, 2022
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.

5 participants