如何在不每次都重新创建容器的情况下提供html文件?

时间:2018-11-08 01:23:13

标签: docker

我认为这应该很简单。我尝试遵循此tutorial

我在Mac上的当前目录为/var/www/html/test/testme/misc/docker-static/web

如何在不每次重新创建容器的情况下提供html文件?

#
# BudgetTracker Dockerfile for UI
#
FROM ubuntu:latest
MAINTAINER Arunkumar Srisailapathi "sail.arunkumar@gmail.com"

USER root

RUN apt-get update
RUN apt-get install -y nginx nodejs

# Remove the default Nginx configuration file
RUN rm -v /etc/nginx/nginx.conf

# Copy a configuration file from the current directory
ADD nginx.conf /etc/nginx/

ADD web /usr/share/nginx/html/
ADD web /var/www/html/

# Append "daemon off;" to the beginning of the configuration
RUN echo "daemon off;" >> /etc/nginx/nginx.conf

# Expose ports
EXPOSE 90

# Set the default command to execute
# when creating a new container
CMD service nginx start

0 个答案:

没有答案