步骤一:拉取镜像并查看镜像
root@centos7:~# docker pull registry.aliyuncs.com/openspug/spug
Using default tag: latest
latest: Pulling from openspug/spug
2d473b07cdd5: Pull complete
c8d7ce97cf0d: Pull complete
74385da70ad4: Pull complete
c83424c7db01: Pull complete
b9e4cd5125ea: Pull complete
0a8010b22945: Pull complete
d2ddbe38d832: Pull complete
55fb0785886b: Pull complete
64026e87ca92: Pull complete
353c6a7e4ce5: Pull complete
9cb5f175562f: Pull complete
67aa9bc0870f: Pull complete
7918f2774cc6: Pull complete
5b3c63fdc7b2: Pull complete
Digest: sha256:4ef7a69a2aebc21f255d8ee7e59ab246eb40613666a9f1b6d512406495c37180
Status: Downloaded newer image for registry.aliyuncs.com/openspug/spug:latest
registry.aliyuncs.com/openspug/spug:latestroot@centos7:~# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
nginx latest e4720093a3c1 12 days ago 187MB
registry.aliyuncs.com/openspug/spug latest 09ad35a1fe69 3 months ago 702MB
wordpress 5.8.0-php8.0-apache 30b91ab1b536 2 years ago 620MB
mysql 5.7.30 9cfcce23593a 3 years ago 448MB
步骤二:运行容器并进行持久化
root@centos7:~# docker run -d --restart=always --name=spug -p 80:80 -v /mydata/:/data registry.aliyuncs.com/openspug/spug
bfd81a4ecb086026d98bdfc86dfd3ce75daa2c0600968dc6cf3d513c8bb3a696root@centos7:~# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
bfd81a4ecb08 registry.aliyuncs.com/openspug/spug "/entrypoint.sh" 3 seconds ago Up 2 seconds 0.0.0.0:80->80/tcp, :::80->80/tcp spug
步骤三:进行初始化
root@centos7:~# docker exec spug init_spug admin 123456
/usr/local/lib/python3.6/site-packages/OpenSSL/_util.py:6: CryptographyDeprecationWarning: Python 3.6 is no longer supported by the Python core team. Therefore, support for it is deprecated in cryptography. The next release of cryptography will remove support for Python 3.6.
from cryptography.hazmat.bindings.openssl.binding import Binding
Migrations for 'account':
Running migrations:
Applying account.0001_initial... OK
Applying alarm.0001_initial... OK
Applying config.0001_initial... OK
Applying app.0001_initial... OK
Applying repository.0001_initial... OK
Applying deploy.0001_initial... OK
Applying exec.0001_initial... OK
Applying home.0001_initial... OK
Applying host.0001_initial... OK
Applying monitor.0001_initial... OK
Applying notify.0001_initial... OK
Applying schedule.0001_initial... OK
Applying setting.0001_initial... OK
初始化/更新成功
/usr/local/lib/python3.6/site-packages/OpenSSL/_util.py:6: CryptographyDeprecationWarning: Python 3.6 is no longer supported by the Python core team. Therefore, support for it is deprecated in cryptography. The next release of cryptography will remove support for Python 3.6.
from cryptography.hazmat.bindings.openssl.binding import Binding
创建用户成功
步骤四:通过本地服务器IP地址访问即可