docker 下安装常用 image

2022-07-08  本文已影响0人  acc8226

Ubuntu

docker run -itd --name ubuntu-test ubuntu

运行容器,并且可以通过 exec 命令进入 ubuntu 容器

cent os

$ docker run -itd --name centos-test centos:centos7

Docker 安装 Node.js

$ docker pull node:latest

$ docker run -itd --name node-test node

Docker 安装 Apache

runoob@runoob:~/apache$ docker pull httpd

运行容器

docker run -p 80:80 -v $PWD/www/:/usr/local/apache2/htdocs/ -v $PWD/conf/httpd.conf:/usr/local/apache2/conf/httpd.conf -v $PWD/logs/:/usr/local/apache2/logs/ -d httpd

命令说明:

查看容器启动情况:

runoob@runoob:~/apache$ docker ps
CONTAINER ID  IMAGE   COMMAND             ... PORTS               NAMES
79a97f2aac37  httpd   "httpd-foreground"  ... 0.0.0.0:80->80/tcp  sharp_swanson

docker 下安装 gitlab

docker pull gitlab/gitlab-ce:latest

docker 下安装 butterfly

一个很美观的网页版终端。

garland/butterfly - Docker Image | Docker Hub https://registry.hub.docker.com/r/garland/butterfly

docker pull garland/butterfly:3.2.3

Starting with login and password

docker run --name firstCMD --env PASSWORD=12345 -d  -p 12345:12345 garland/butterfly:3.2.3 --login --port=12345

docker 下安装 php

docker pull adminer

Adminer - Official Image | Docker Hub
https://hub.docker.com/_/adminer

docker run -p 8081:8080 adminer

docker 下安装 postgres

docker run --name my-postgres -e POSTGRES_PASSWORD=mysecretpassword -d postgres:11
上一篇 下一篇

猜你喜欢

热点阅读