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

[BUG] Possible bug with dockerfile #354

Open
FedeParola opened this issue Dec 3, 2020 · 0 comments
Open

[BUG] Possible bug with dockerfile #354

FedeParola opened this issue Dec 3, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@FedeParola
Copy link
Collaborator

Describe the bug

As @klaalk pointed out there is a problem when running the docker container without having first installed Polycube on the host system.

To Reproduce

Run the container on a system without Polycube installed with command:

docker run -it --rm --privileged --network host -v /proc:/host/proc -v /lib/modules:/lib/modules:ro -v /usr/src:/usr/src:ro -v /etc/localtime:/etc/localtime:ro polycubenetwork/polycube:latest

An error will be printed saying no polycubed binary is found.

Expected behavior

Polycube should run properly

Please tell us about your environment:

  1. OS details: Ubuntu Server 20.04.1 LTS
  2. Kernel details: 5.4.0-56-generic
  3. Polycube Version: latest

Additional context

I think the problem is related with the last line of the Dockerfile:

CMD ["nsenter","--mount=/host/proc/1/ns/mnt","polycubed"]

nsenter causes the container to use the File System of the host, therefore running the polycubed binary of the host. If this binary is not found on the FS of the host an error is thrown.
The last line of the Dockerfile is overridden if a command is executed when running the container, for example launching the container with the command of the documentation:

docker run  -it --rm --privileged --network host -v /lib/modules:/lib/modules:ro -v /usr/src:/usr/src:ro -v /etc/localtime:/etc/localtime:ro polycubenetwork/polycube:latest /bin/bash -c 'polycubed -d && /bin/bash'

nsenter is not executed and the container runs the internal polycube binary.

Can anyone confirm this problem? I wonder if nsenter can be removed safely (a comment says that it is needed for shadow services)

@FedeParola FedeParola added the bug Something isn't working label Dec 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant