我创建了我的第一个 Dockerfile,但是当我运行命令时
sudo docker ps
容器没有在后台运行,这是我的 dockerfile:
# Set the base image to Ubuntu
FROM debian:jessie
# File Author / Maintainer
MAINTAINER <Qop>
# Update the repository sources list
RUN apt-get update
################## BEGIN INSTALLATION ######################
RUN apt-get update && apt-get upgrade -y
RUN apt-get install -y \
vim \
apache2
##################### INSTALLATION END #####################
# Expose the default port
EXPOSE 81
# Default port to execute the entrypoint (MongoDB)
CMD ["--port 81"]
# Set default container command
ENTRYPOINT /bin/bash