-
命令小结(1)
查看全部 -
上课前可以将本节课的所有代码先clone下来。
git clone https://github.com/cy101/ghost_config.git
查看全部 -
nginx 配置
worker_processes 4;
events {worker_connections 1024;}
http {
server {
listen 80;
location / {
proxy_pass http://ghost-app:2368;
}
}
}查看全部 -
config.js 文件复制
var path = require('path'),
config;
config = {
production: {
url: 'http://mytestblog.com',
mail: {},
database: {
client: 'mysql',
connection: {
host: 'db',
user: 'ghost',
database: 'ghost',
port: '3306',
charset: 'utf-8'
},
debug: false
},
paths: {
contentPath: path.join(process.env.GHOST_CONTENT,'/')
},
server: {
host: '0.0.0.0',
port: '2368'
}
}
};
module.exports =config;查看全部 -
创建Dockerfile文件
查看全部 -
docker build -t xgqfrms/nginx . docker run nginx
-t tag
. 当前目录
docker run -d -p 80:80 xgqfrms/nginx
curl http://localhost
查看全部 -
ENTRYPOINT ["usr/sbin/nginx", "-g", "daemon off;"] EXPOSE 80
查看全部 -
linux sed
替换 ?
RUN sed -i 's/archive.ubuntu.com/mirrors.ustc.edu.cn/g' /etc/apt/sources.list RUN apt-get update
查看全部 -
FROM ubuntu MAINTAINER admin@xyqfrms.xyz RUN sed -i 's/archive.ubuntu.com/mirrors.ustc.edu.cn/g' /etc/apt/sources.list RUN apt-get update RUN apt-get install -y nginx COPY index.html /var/www/html ENTRYPOINT ["usr/sbin/nginx", "-g", "daemon off;"] EXPOSE 80
查看全部 -
构建 image
docker build -t ImagesName .
. path
查看全部 -
Dockerfile
FROM alpine: latest MAINTAINER xbf CMD echo 'hello docker'
查看全部 -
docker ps -a
docker rm ids
clear
===
command + L
查看全部 -
docker rmi id
remove image
查看全部 -
保存
docker commit -m "message" container id new-container-name
查看全部
举报