0
我做的周圍使用Ubuntu,爲此我已經下文提到Dockerfile泊塢窗容器中運行,但沒有響應爲localhost:49153
FROM ubuntu:14.04
MAINTAINER Paresh Bhavsar "[email protected]"
ENV REFRESHED AT "04-06-2015"
RUN apt-get update
RUN apt-get -y -q install nginx
RUN mkdir -p /var/www/html
ADD nginx/global.conf /etc/nginx/conf.d/
ADD nginx/nginx.conf /etc/nginx/nginx.conf
EXPOSE 80
nginx.conf文件nginx的成分POC ---
user www-data;
worker_processes 4;
pid /run/nginx.pid;
daemon off;
events { }
http {
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
include /etc/nginx/mime.types;
default_type application/octet-stream;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
gzip on;
gzip_disable "msie6";
include /etc/nginx/conf.d/*.conf;
}
global.conf文件
server {
listen 0.0.0.0:80;
}
root /var/www/html/website;
index index.html index.htm;
碼頭集裝箱正在運行,顯示如下所述。
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9e32a617896a pbhavsar211/nginx:latest "nginx" 15 minutes ago Up 15 minutes 0.0.0.0:49163->80/tcp website
我無法顯示頁面本地主機:49153,嘗試與IP地址也沒有運氣。
我在這裏錯過了什麼。提前致謝。
你嘗試49163?看起來像一個錯字... –
這是通過boot2docker? – resultsway
我想像往常一樣,阿德里安是對的,但你可以通過打開終端「docker exec -it 9e3 bash」來調試,然後用netstat或其他任何東西 – user2915097