我正在尝试构建一个 docker 容器,但它似乎没有找到我的 start.sh。它将它复制到容器中,但不知何故不起作用。
这是我的 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
Run Code Online (Sandbox Code Playgroud)
这是我的 start.sh:
#!/bin/bash
sleep 20
/app/meteor run
# don't exit
/usr/bin/tail -f /dev/null
Run Code Online (Sandbox Code Playgroud)
我也不确定 start.sh 中的流星运行命令。我如何告诉流星运行在特定目录中执行,而无法 cd 进入它?
我使用的是 Windows 10。我的meteor 应用程序位于\app\ 目录中,Dockerfile 和start.sh 位于与应用程序文件夹相同的目录中。
我使用以下命令构建容器: docker build …