My Dockerfile is this
FROM mcr.microsoft.com/dotnet/core/runtime:3.0
COPY publish/ app/
RUN mkdir -p /in
RUN mkdir -p /tmp
ENTRYPOINT ["dotnet", "app/Watcher.dll"]
and I build image with this command
docker build -t watcher/sl_user_test:1.1 .
so, my docker-compose is this
watcher.sl_user_test:
image: watcher/sl_user_test:1.1
container_name: watcher_sl_user_test
build: .
restart: always
volumes:
- /var/storage/in:/in:z
- /var/storage/tmp:/tmp:z
In my dotnet core app I get a file in the /in folder and I move it to /tmp/aaa code is this
string destination = $"/tmp/{Guid.NewGuid()}/git.zip";
new FileInfo(destination).Directory.Create();
File.Move("/in/git.zip", destination, true);
the problem is that this command copy file and doesn't move it, why? If I go inside the container I can do mv from bash and it works