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

required validation with multiple env on the same line doesn't work #37668

Open
AmirAliSobhGol opened this issue Aug 18, 2018 · 0 comments
Open

Comments

@AmirAliSobhGol
Copy link

AmirAliSobhGol commented Aug 18, 2018

Description

if an environment is put after another environment variable on the same line, only the one on the right gets validated in swarm mode.
for example:
BUG: ${A_ENV:?requied},${B_ENV}
doesn't validate A_ENV

however
BUG: ${B_ENV} ,${A_ENV:?requied}
works as expected

Steps to reproduce the issue:

  1. docker stack deploy -c docker-compose.yml bug
version: '3.6'
services:
  data:
    image: busybox:latest
    environment:
      BUG: ${A_ENV:?required}${B_ENV}

Describe the results you received:
Creating service bug_data

Describe the results you expected:
invalid interpolation format for services.data.environment.BUG: "required variable A_ENV is missing a value: required". You may need to escape any $ with another $.

Additional information you deem important (e.g. issue happens only occasionally):

Output of docker version:

(paste your output here)
Docker version 18.06.0-ce, build 0ffa825

Output of docker info:

(paste your output here)
Containers: 67
 Running: 0
 Paused: 0
 Stopped: 67
Images: 1428
Server Version: 18.06.0-ce
Storage Driver: overlay2
 Backing Filesystem: extfs
 Supports d_type: true
 Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: active
 NodeID: swm270rgby5lholx628ihjxji
 Is Manager: true
 ClusterID: ep8prb0kbh7v3s6t5ojrb7nlb
 Managers: 1
 Nodes: 1
 Orchestration:
  Task History Retention Limit: 5
 Raft:
  Snapshot Interval: 10000
  Number of Old Snapshots to Retain: 0
  Heartbeat Tick: 1
  Election Tick: 10
 Dispatcher:
  Heartbeat Period: 5 seconds
 CA Configuration:
  Expiry Duration: 3 months
  Force Rotate: 0
 Autolock Managers: false
 Root Rotation In Progress: false
 Node Address: 192.168.21.66
 Manager Addresses:
  192.168.21.66:2377
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: d64c661f1d51c48782c9cec8fda7604785f93587
runc version: 69663f0bd4b60df09991c08812a60108003fa340
init version: fec3683
Security Options:
 apparmor
 seccomp
  Profile: default
Kernel Version: 4.15.0-30-generic
Operating System: Ubuntu 18.04.1 LTS
OSType: linux
Architecture: x86_64
CPUs: 8
Total Memory: 11.31GiB
Name: bml-ThinkPad-Edge-E531
ID: QJIC:UC5B:ZQQR:MBXA:3B2X:EKQY:5B4M:HE62:MVTR:BF5F:SOYL:CJTS
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
No Proxy: localhost,127.0.0.1,registry.bamilo.com
Username: amiralisobhgol
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
 127.0.0.0/8
Registry Mirrors:
 https://registry.docker-cn.com/
Live Restore Enabled: false

WARNING: No swap limit support

Additional environment details (AWS, VirtualBox, physical, etc.):

@AmirAliSobhGol AmirAliSobhGol changed the title required validation with multiple env on sameline doesn't work required validation with multiple env on the same line doesn't work Aug 18, 2018
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

No branches or pull requests

1 participant