title: Docker secrets not working when password has special characters
body: <p>I am trying to run jenkins swarm agent using the docker-compose provided <a href="https://github.com/vfarcic/docker-flow-stacks/tree/master/jenkins#jenkins-swarm-agent-secretsyml" rel="nofollow noreferrer">here</a>.</p>
  <p>Issue is I am using a service account provided by my admin team to authenticate against jenkins master and the password for the service account contains special characters \ (backslash) and / (forward slash). Example:</p>
  <blockquote>
  <p>abcdefghifjd12\ab/</p>
  </blockquote>
  <p>The docker secret I created using this password doesn't work. I tried with my personal account which doesn't have any special characters and this works as expected. So I believe issue is with how docker is interpreting these special characters when creating secrets. I tried escaping the back slash and using single quotes for the password but doesn't work. I tried below</p>
  <pre><code>#use password as it is in double quotes
  echo &quot;abcdefghifjd12\ab/&quot; | docker secret create jenkins-user -
  
  #use backslash to escape backslash
  echo &quot;abcdefghifjd12\\ab/&quot; | docker secret create jenkins-user -
  
  #use single quotes
  echo 'abcdefghifjd12\ab/' | docker secret create jenkins-user -
  </code></pre>
  <p>None worked. How do I resolve this issue?</p>
  <p>Server:</p>
  <blockquote>
  <p>Version:      17.06.2-ee-6</p>
  <p>API version:  1.30 (minimum version 1.12)</p>
  <p>Go version:   go1.8.3</p>
  <p>Git commit:   e75fdb8</p>
  <p>Built:        Mon Nov 27 22:44:25 2017</p>
  <p>OS/Arch:      linux/amd64</p>
  <p>Experimental: false</p>
  </blockquote>