Open Vacant0mens opened 5 years ago
confirmed that the problem occurs even with no named pipe mapping configured. updated issue title and initial post appropriately.
I have same issue with swarm. Workaround for me is to remove VOLUME directive from dockerfile.
Example for portainer wich works in swarm on windows with data mount: Download release 1.21.0. Extract to folder "portainer". Dockerfile:
FROM mcr.microsoft.com/windows/nanoserver:1809
COPY portainer /
WORKDIR /
EXPOSE 9000
USER ContainerAdministrator
ENTRYPOINT ["/portainer.exe"]
docker build -t portainer:1.21.0-nanoserver-1809 .
Interesting. I'll try running the container as another user (outside of the build).
I attempted to run the following two scenarios:
version: '3.7'
services:
portainer:
image: portainer/portainer:windows1809-amd64
credential_spec:
file: GMSA-User.json # domain-based GMSA
ports:
- 9000:9000
volumes:
- type: bind
source: E:\Portainer
target: C:\data
- type: npipe
source: \\.\pipe\docker_engine
target: \\.\pipe\docker_engine
and
services:
portainer:
image: portainer/portainer:windows1809-amd64
user: "NT Authority\\SYSTEM" # localsystem service user
ports:
- 9000:9000
volumes:
- type: bind
source: E:\Portainer
target: C:\data
- type: npipe
source: \\.\pipe\docker_engine
target: \\.\pipe\docker_engine
Both of those users are valid, but it gave me the same error message using both.
I would like a way to persist the data from my portainer
service without relying on docker volumes because a volume may be dropped and spun up again at any time and then we'd lose the configuration each time the volume gets re-created.
@ziilok I don't really want to build my own image every time I need to update portainer on my system. I may do it temporarily, but I'll see about opening an issue on their end to update their dockerfile.
created: portainer/portainer/issue#3132
Hello. Looks like it's an issue of docker swarm on windows. I discovered this error when I tried to deploy team city in swarm.
I ran into the same problem when deploying a team city agent to a swarm on windows. I'm fairly new to docker and didn't realize I could still mount volumes if they weren't declared in the Dockerfile, so I'm glad to have a workaround. But this seems to be a fairly fundamental break to docker swarm on windows, so I hope it gets some attention.
Description Within Swarm, deploying a stack with bind-mount volume present in the config results in
starting container failed: hcsshim::CreateComputeSystem 4818f892a98a6bb185d291a84f308883a3c2814a78ccbfdee4ca401186b39e31: The request is not supported
Steps to reproduce the issue:
Or
docker stack deploy
command succeeds, but service crashes with error mentioned.docker stack deploy
command succeeds and service starts normally.Describe the results you received: stack service does not start, throws error mentioned (only visible in
docker service ps [stackname]_[servicename] --no-trunc
)Describe the results you expected: service should start and map volumes appropriately
Additional information you deem important (e.g. issue happens only occasionally):
Output of
docker version
:Output of
docker info
:Additional environment details (AWS, VirtualBox, physical, etc.): Swarm of 5 managers all running Windows Server 2019
EDIT:
docker service create --name portainer -p 9000:9000 --mount type=bind,source=E:\data,destination=C:\data portainer/portainer:windows1809-amd64
also throws the same error as above.But this works:
docker run -d -p 9000:9000 --name portainer --restart always -v E:\Portainer:C:\data portainer/portainer:windows1809-amd64