-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Can't use port mapping with docker driver #8770
Comments
Okay, I was able to get the basic container up with the following file:
The fact that the newer syntax doesn't work and I can't seem to find documentation for the deprecated port_map(had to combine info I gathered around the web) is odd though. Wondering if I rushed through the docs and I'm missing something here. |
Hi @leonardoarroyo! Sorry about that, I think you're running into the same sort of documentation problems folks are running into in #8747 and #8746. I'm going to tag-in my colleagues @nickethier and @shoenig here as they've been working on this area lately and probably can best answer what's the best way forward. |
Have the same issue. Unfortunately the examples from the docs are not working as described. Also, I noticed that ports declared in |
Hey @leonardoarroyo The syntax you have in your original issue is correct but was introduced in v0.12.2. Declaring the network resource in the task is deprecated which is why the documentation is missing. I've done some work to improve that and hopefully lessen confusion in #8743 which hasn't been merged yet. Could you try your original job definition with a newer version? |
I'm having the same issue as @sarneeh on defining services at the task level - is there a separate ticket for that? |
I see this is in v0.12.5 (I'm running v0.12.3) - I'm sure that's the issue. My bad - thanks! |
I ran into this issue as well with 0.12.5. Services must be declared at the group level otherwise you'll get this error. This was surprising and I would have expected services at the task level to be deprecated alongside the network change if this is the intended behavior. |
I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues. |
Nomad version
Nomad v0.12.1 (14a6893)
Operating system and Environment details
Linux i5 5.7.12-arch1-1 #1 SMP PREEMPT Fri, 31 Jul 2020 17:38:22 +0000 x86_64 GNU/Linux
Issue
I can't seem to run a basic docker container and map the ports. Using ports config gives an error, it seems to be accepting the port_map configuration but it's odd because the docs here says I should be using the ports syntax.
Reproduction steps
Running the following job will give you a "pending" status.
Job file (if appropriate)
The following job file gives a running state but maps the wrong port.
Nomad Client logs (if appropriate)
When running
nomad alloc status
I get:Nomad Server logs (if appropriate)
The text was updated successfully, but these errors were encountered: