Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NGINX build fails on Windows 10 #108

Open
pranshubarve opened this issue Oct 14, 2018 · 4 comments
Open

NGINX build fails on Windows 10 #108

pranshubarve opened this issue Oct 14, 2018 · 4 comments

Comments

@pranshubarve
Copy link

PS F:\Code\nodock> docker-compose up -d nginx
Building nginx
Step 1/16 : FROM nginx
 ---> 5699ececb21c
Step 2/16 : RUN mkdir /etc/nginx/sites-available && rm /etc/nginx/conf.d/default.conf
 ---> Running in 05c19a8c8395
Removing intermediate container 05c19a8c8395
 ---> 53615299ba83
Step 3/16 : ADD nginx.conf /etc/nginx/
 ---> 4a2991bb05ed
Step 4/16 : COPY scripts /root/scripts/
 ---> 8a8e3f3a2497
Step 5/16 : COPY certs /etc/ssl/
 ---> fdbbd4bbc04e
Step 6/16 : COPY sites /etc/nginx/templates
 ---> 0920fd03b516
Step 7/16 : ARG WEB_REVERSE_PROXY_PORT=8000
 ---> Running in 69ae203cbda8
Removing intermediate container 69ae203cbda8
 ---> fe6c54e0abc5
Step 8/16 : ARG WEB_SSL=false
 ---> Running in 5decb625eda8
Removing intermediate container 5decb625eda8
 ---> c14f6eb191ba
Step 9/16 : ARG SELF_SIGNED=false
 ---> Running in 4a4eb1069fc5
Removing intermediate container 4a4eb1069fc5
 ---> d57093e65e15
Step 10/16 : ARG NO_DEFAULT=false
 ---> Running in b2d189c568d0
Removing intermediate container b2d189c568d0
 ---> 0f064b5a56f3
Step 11/16 : ENV WEB_REVERSE_PROXY_PORT=$WEB_REVERSE_PROXY_PORT
 ---> Running in e32965edeebe
Removing intermediate container e32965edeebe
 ---> d47654c41b28
Step 12/16 : ENV WEB_SSL=$WEB_SSL
 ---> Running in c2fbbb6a5777
Removing intermediate container c2fbbb6a5777
 ---> 1fe5abeeea87
Step 13/16 : ENV SELF_SIGNED=$SELF_SIGNED
 ---> Running in 563dbf23caf5
Removing intermediate container 563dbf23caf5
 ---> a76503b24b5d
Step 14/16 : ENV NO_DEFAULT=$NO_DEFAULT
 ---> Running in b7299fbeaaf9
Removing intermediate container b7299fbeaaf9
 ---> 31e87361e83f
Step 15/16 : RUN /bin/bash /root/scripts/build-nginx.sh
 ---> Running in 5e39752dc129
/root/scripts/build-nginx.sh: line 2: $'\r': command not found
/root/scripts/build-nginx.sh: line 3: syntax error near unexpected token `$'do\r''
'root/scripts/build-nginx.sh: line 3: `for conf in /etc/nginx/templates/*.conf; do
ERROR: Service 'nginx' failed to build: The command '/bin/sh -c /bin/bash /root/scripts/build-nginx.sh' returned a non-z
ero code: 2
@philtrep philtrep changed the title I am getting the following error in windows 10 can you please help how to fix this error? NGINX build fails on Windows 10 Oct 15, 2018
@philtrep
Copy link
Member

@pranshubarve Seems to be related to the line endings. Make sure you save the build-nginx.sh script with unix line endings.

The dos2unix utility can help you with this: dos2unix build-nginx.sh otherwise your editor may allow you to directly change line endings.

I'm don't really develop on Windows sadly so I'm unsure what other tooling exists for this.

@pranshubarve
Copy link
Author

@pranshubarve Seems to be related to the line endings. Make sure you save the build-nginx.sh script with unix line endings.

The dos2unix utility can help you with this: dos2unix build-nginx.sh otherwise your editor may allow you to directly change line endings.

I'm don't really develop on Windows sadly so I'm unsure what other tooling exists for this.

OK Thank you, I will check soon.

@philtrep
Copy link
Member

@pranshubarve great, keep me updated!

@philtrep
Copy link
Member

philtrep commented Nov 6, 2018

@pranshubarve let me know how it goes 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants