ERR_SOCKET_NOT_CONNECTED,在本地主机上运行docker时

时间:2019-09-24 13:27:45

标签: r docker deployment plumber

每当我尝试在localhost上运行Docker时,访问端口localhost:8000时都会收到以下错误消息

http://localhost:8000/处的网页可能暂时关闭,或者已永久移动到新的网址。 ERR_SOCKET_NOT_CONNECTED

这是我在dockerfile中拥有的内容:

#run existing docker image
FROM rocker/r-ver:3.5.0

#update OS and install linux libraries needed to run plumber
RUN apt-get update -qq && apt-get install -y \
      libssl-dev \
      libcurl4-gnutls-dev

#load in dependencies from 00_Libraries.R file
RUN R -e "install.packages('plumber')"
RUN R -e "install.packages('openxlsx')"
RUN R -e "install.packages('kohonen')"
RUN R -e "install.packages('sqldf')"
RUN R -e "install.packages('RColorBrewer')"
RUN R -e "install.packages('stringr')"
RUN R -e "install.packages('stringi')"
RUN R -e "install.packages('NbClust')"
RUN R -e "install.packages('ape')"
RUN R -e "install.packages('ggdendro')"
RUN R -e "install.packages('dendextend')"
RUN R -e "install.packages('circlize')"
RUN R -e "install.packages('dendextend')"
RUN R -e "install.packages('blockcluster')"
RUN R -e "install.packages('gplots')"
RUN R -e "install.packages('pryr')"
RUN R -e "install.packages('vegan')"
RUN R -e "install.packages('dbscan')"
RUN R -e "install.packages('tidyr')"


#Copy all files from current directory
COPY . . 

#Expose port :9000 for traffic
EXPOSE 8000

#when the container starts, start the runscript.R script
ENTRYPOINT ["Rscript", "runscript.R"]

我安装了我的R服务器要运行所需的所有依赖项,然后运行runscript.R这是启动服务器的过程。

如果我自己运行命令,则可以正常访问端口。

此外,终端输出完全相同,因此应该可以正常工作,但是我似乎无法访问它。

0 个答案:

没有答案