title: How can i use Dockerfile in Docker swarm?
body: <p>I'm using Docker swarm in windows Server Core 2016
  I'm trying to create containers using docker stack deploy -c docker-compose.yml </p>
  
  #
  
  <p>this is my YML file :</p>
  
  <pre><code>version: "3"
  services:
  db:
      image: microsoft/mssql-server-windows-express
      networks: 
         - cpxnet2           
      deploy:         
         environment:
            - SA_PASSWORD=Abcd1234
            - ACCEPT_EULA=Y         
  web:
      image: microsoft/iis:latest
      build: .
      networks: 
         - cpxnet2                 
      deploy:
          resources:
              limits:
                  memory: 500M    
      ports:
       -  "800:80"
      depends_on:
          - db  
  networks: 
      cpxnet2:
  </code></pre>
  
  #
  
  <p>this is my Dockerfile :</p>
  
  <pre><code>FROM microsoft/iis:latest
  RUN powershell -NoProfile -Command Remove-Item -Recurse C:\inetpub\wwwroot\*
  WORKDIR /inetpub/wwwroot
  COPY ./index.html /index.html
  </code></pre>
  
  #
  
  <p>this is my Container content after creating :</p>
  
  <p>Directory: C:\inetpub\wwwroot</p>
  
  <blockquote>
    <p>Mode                LastWriteTime         Length Name
    ----                -------------         ------ ----
    -a----        3/13/2019  10:56 AM            703 iisstart.htm
    -a----        3/13/2019  10:56 AM          99710 iisstart.png</p>
  </blockquote>
  
  <p>it should at least delete old files and copy my index.html file 
  but this doesn't happen !! what should i do ?</p>
  
  <p>thank you for support !</p>