切换 aliyun 镜像
sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
切换 科大镜像
sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories
安装 插件
apk add openrc --no-cache ( rc-service 需要使用 openrc )
步骤
sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
apk update
apk upgrade
apk add nginx
apk add openrc --no-cache
adduser -D -g 'www' www
mkdir /www
chown -R www:www /usr/share/nginx
chown -R www:www /www
rc-service nginx start
rc-update add nginx default
docker cp ./nginx.conf n1:/etc/nginx/nginx.conf
docker cp ./default.conf n1:/etc/nginx/conf.d/default.conf
网友评论