I'm trying to build a docker container, but it doesn't seem to find my start.sh. It copies it to the container, but it somehow doesnt work.
This is my dockerfile:
FROM ubuntu:16.04
# Install Meteor
RUN apt-get update
RUN apt-get install -y curl
RUN curl https://install.meteor.com/ | sh
RUN meteor npm install --save highcharts
# Entypointscript
COPY start.sh /
RUN chmod u+x /start.sh
# Copy App
COPY /app /app
# UI Expose
EXPOSE 80
ENTRYPOINT /start.sh
And this is my start.sh:
#!/bin/bash
sleep 20
/app/meteor run
# don't exit
/usr/bin/tail -f /dev/null
Also I'm not sure about that meteor run command in the start.sh. How do I tell meteor run to be executed in a specific directory, without being able to cd into it?
I'm using Windows 10. I have my meteor app in the \app\ directory and the Dockerfile and start.sh in the same directory as the app folder.
I build the container using: docker build -t meteorapp .
The error when I'm trying to run using:
docker run -p 80:80 --net docker-network --name meteorapp meteorapp
is:
/bin/sh: 1: /start.sh: not found
Thank you very much!
I'm also running on Windows 10 and the fix for me was to change line endings from CR LF (windows) to LF (Unix).
I did this with Notepad++ making this very easy and now I can build images. In "Edit" menu of Notepad++, you have "EOL conversion" that does exactly what you need.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With