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
Allow Empty Label Values for Containers #2646
Comments
@deviantony If you'd like to point me in the right direction I can take a shot at a small code change + PR |
Here's an entrypoint for network creation for example: https://github.com/portainer/portainer/blob/develop/app/docker/views/networks/create/createNetworkController.js#L86 |
@deviantony Quick question Where is the underlying code for things like Edit Looks like If the jsonObject returned for a key is empty string will it be assigned nill instead of empty string? |
Hi @mcrosson Regarding your first question you can usually find these in the Backend should not remove empty labels, I'll check that. |
@deviantony Thanks! I did open a PR for the rest of the empty label updates for the container side. The only thing that I ran into is the |
Closed via #2655 |
Bug description
When deploying a container you cannot specify labels without an empty value. If you don't specify a value they are silently dropped from container creation and cannot be added via the web ui.
Expected behavior
Allow empty/null values for labels set on containers. This is valid per the docker spec and some utilities use labels with empty labels to help with auto-discovery
Steps to reproduce the issue:
Steps to reproduce the behavior:
Deploy a container with a label and no value specified
Technical details:
Docker version 18.09.0, build 4d60db4
docker run -p 9000:9000 portainer/portainer
):docker run
--name portainer
--restart unless-stopped
--net docker-private
--ip 172.30.30.30
-p 9000:9000
-e TZ=UTC
-v /var/portainer:/data
-v /var/run/docker.sock:/var/run/docker.sock
portainer
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: