Skip to content

Environment variables not used by docker stack deploy, when using Docker CE from Windows #1404

Description

@eiximenis

Description

I am using Docker CE For Windows (Version 2.0.0.0-beta1-win75 (19925) and using docker stack deploy to deploy a workload against the local k8s cluster.

I see that environment values in my cmd session are not used. In the issue #939 there is a comment from @thaJeztah that says:

Environment variables that are substituted while processing the docker compose file are already possible

This don't seem to be true in Windows. I have one compose with following service:

  basket-api:
    image: eshop/basket.api:${TAG:-latest}

Also variable TAG is defined. If I do a docker-compose config I see the image resolved to my tag, but when using docker stack deploy it resolves to latest (TAG environment variable is not used).

Output of docker version:

Client: Docker Engine - Community
 Version:           18.09.0-ce-beta1
 API version:       1.39
 Go version:        go1.10.4
 Git commit:        78a6bdb
 Built:             Thu Sep  6 22:42:13 2018
 OS/Arch:           windows/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          18.09.0-ce-beta1
  API version:      1.39 (minimum version 1.12)
  Go version:       go1.10.3
  Git commit:       78a6bdb
  Built:            Thu Sep  6 22:49:35 2018
  OS/Arch:          linux/amd64
  Experimental:     true
 Kubernetes:
  Version:          v1.10.3
  StackAPI:         v1beta2

Output of docker info:

Containers: 84
 Running: 41
 Paused: 0
 Stopped: 43
Images: 212
Server Version: 18.09.0-ce-beta1
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 ipvlan macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 468a545b9edcd5932818eb9de8e72413e616e86e
runc version: 69663f0bd4b60df09991c08812a60108003fa340
init version: fec3683
Security Options:
 seccomp
  Profile: default
Kernel Version: 4.9.125-linuxkit
Operating System: Docker for Windows
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 3.837GiB
Name: linuxkit-00155d016143
ID: M5NF:TR4Q:KLJD:VP6F:SWCS:RINA:BSWB:55AK:U4ON:QAM7:44TV:VKRV
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
 File Descriptors: 241
 Goroutines: 211
 System Time: 2018-10-01T16:58:03.4059414Z
 EventsListeners: 1
Registry: https://index.docker.io/v1/
Labels:
Experimental: true
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false
Product License: Community Engine

Unfortunately **I can't use the "hack" docker-compose config | docker stack deploy -c - due to the issue #1403

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions