I have docker file as below … .
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
USER app
WORKDIR /app
EXPOSE 8080
.........
......
Inside this docker file, I have one shell script, that runs and generate some files. I have below statements for this…
USER root
RUN ./Release.sh
This executed as expected on my laptop.
Now on build server same docker file while building throws different error like file not found etc.
=> CACHED [final 8/9] RUN chmod -R 777 /app/Logs 0.0s
=> ERROR [final 9/9] RUN ./Release.sh 0.3s
------
> [final 9/9] RUN ./Release.sh:
: not foundease.sh: 2:
: not foundease.sh: 5:
: not foundease.sh: 43:
: not foundease.sh: 45:
------
Dockerfile:41
--------------------
39 | RUN chmod -R 777 /app/Logs
40 |
41 | >>> RUN ./Release.sh
42 |
43 |
On Laptop -
docker context ls
NAME DESCRIPTION DOCKER ENDPOINT ERROR
default Current DOCKER_HOST based configuration npipe:////./pipe/docker_engine
desktop-linux * Docker Desktop npipe:////./pipe/dockerDesktopLinuxEngine
desktop-windows Docker Desktop npipe:////./pipe/dockerDesktopWindowsEngine
On Build Server
PS C:\Users\Administrator> docker context ls
NAME DESCRIPTION DOCKER ENDPOINT ERROR
default Current DOCKER_HOST based configuration npipe:////./pipe/docker_engine
desktop-linux * Docker Desktop npipe:////./pipe/dockerDesktopLinuxEngine
Both machines are on latest version of docker and wsl… can some one help me to trouble shoot ?
After adding below statement, it executes, but files are not changed.
.....
SHELL ["chmod", "+x"]
RUN ./Release.sh
......