darrenferguson / docker-umbraco-9

A Dockerfile for setting up a test Umbraco 9
9 stars 4 forks source link

app/startup.sh not found #1

Open mattou07 opened 3 years ago

mattou07 commented 3 years ago

When building the docker file there are no errors. However when I run docker-compose without specifying the detached flag I get the following error:

PS D:\dev\github\docker-umbraco-9> docker compose up
[+] Running 1/1
 - Container docker-umbraco-9_web_1  Started                                                                       4.0s
Attaching to web_1
web_1  | /bin/sh: 1: /app/startup.sh: not found
web_1 exited with code 127

When running in detached mode I can see the same error in Docker Desktop

image

Might just be limited to my machine only but thought I would start an issue. OS Name Microsoft Windows 10 Pro Version 10.0.19042 Build 19042

Build log with cache disabled:

PS D:\dev\github\docker-umbraco-9> docker build --no-cache ./
[+] Building 384.6s (28/28) FINISHED
 => [internal] load build definition from Dockerfile                                                               0.4s
 => => transferring dockerfile: 32B                                                                                0.4s
 => [internal] load .dockerignore                                                                                  0.3s
 => => transferring context: 2B                                                                                    0.3s
 => resolve image config for docker.io/docker/dockerfile:1                                                        11.2s
 => [auth] docker/dockerfile:pull token for registry-1.docker.io                                                   0.0s
 => CACHED docker-image://docker.io/docker/dockerfile:1@sha256:e2a8561e419ab1ba6b2fe6cbdf49fd92b95912df1cf7d313c3  0.0s
 => [internal] load metadata for docker.io/library/buildpack-deps:stretch                                         11.8s
 => [auth] library/buildpack-deps:pull token for registry-1.docker.io                                              0.0s
 => [internal] load build context                                                                                  0.0s
 => => transferring context: 97B                                                                                   0.0s
 => CACHED [ 1/19] FROM docker.io/library/buildpack-deps:stretch@sha256:04f933352c6a3e46933907f5a7fb6f37134e02720  0.0s
 => [ 2/19] COPY ./app /app                                                                                        0.1s
 => [ 3/19] WORKDIR /app                                                                                           0.1s
 => [ 4/19] RUN apt-get update                                                                                    20.8s
 => [ 5/19] RUN apt-get install -y apt-transport-https                                                             2.4s
 => [ 6/19] RUN apt-get install -y software-properties-common                                                     41.1s
 => [ 7/19] RUN curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -                             2.9s
 => [ 8/19] RUN add-apt-repository "$(wget -qO- https://packages.microsoft.com/config/ubuntu/16.04/mssql-server-2  1.9s
 => [ 9/19] RUN add-apt-repository "$(wget -qO- https://packages.microsoft.com/config/ubuntu/16.04/prod.list)"     2.0s
 => [10/19] RUN apt-get update                                                                                     3.4s
 => [11/19] RUN apt-get install -y mssql-server                                                                  117.3s
 => [12/19] RUN apt-get install -y mssql-tools                                                                     6.0s
 => [13/19] RUN wget https://packages.microsoft.com/config/ubuntu/21.04/packages-microsoft-prod.deb -O packages-m  1.0s
 => [14/19] RUN dpkg -i packages-microsoft-prod.deb                                                                0.8s
 => [15/19] RUN rm packages-microsoft-prod.deb                                                                     0.6s
 => [16/19] RUN apt-get update                                                                                     3.4s
 => [17/19] RUN apt-get install -y dotnet-sdk-5.0                                                                 46.4s
 => [18/19] RUN dotnet new -i Umbraco.Templates::9.0.0-rc001                                                      19.2s
 => [19/19] RUN dotnet new umbraco -n Umb                                                                         72.4s
 => exporting to image                                                                                            17.8s
 => => exporting layers                                                                                           17.8s
 => => writing image sha256:6bebfd8dd20d5bb1494e624deb0c5ae3f16ea5ec39d8e91962dd1fd49394d0e2                       0.0s

Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them
PS D:\dev\github\docker-umbraco-9> docker compose up
[+] Running 1/1
 - Container docker-umbraco-9_web_1  Started                                                                       9.6s
Attaching to web_1
web_1  | /bin/sh: 1: /app/startup.sh: not found
web_1 exited with code 127
PS D:\dev\github\docker-umbraco-9>
darrenferguson commented 3 years ago

Did you clone the whole repo?

Admittedly this is the first Dockerfile I've written but as I understand it - this line:

COPY ./app /app

Copies the app folder relative to the repo root into the container.

Do you have ./app/startup.sh in your local folder?

Are you running Docker from within the repo root folder?

Other than that I'd be a bit stuck - I'm on Win10 pro too.