window:
docker run --detach
--name sentry-redis `
redis:3.2-alpine
复制粘贴:
右键选择标记,选中再右键取消,然后再右键选择粘贴
4.git bash 远程登录docker machine
因为Docker Quickstart Terminal不能复制粘贴不方便,而power shell 有些命令和linux下有差别。所以用git bash远程登录docker machine。
上图有docker 虚拟机的地址 192.168.99.100,默认用户名/密码: docker/tcuser
打开git,输入ssh docker@192.168.99.100
然后输入密码 tcuser
5.docker run
--rm {REPOSITORY}
config generate-secret-key
一直报错ERROR: No such service: config或者报下面的错误
docker-compose ERROR: for postgres Cannot create container for service postgres: b"invali D:\Docker Toolbox\onpremise\data\postgres:/var/lib/postgresql/data:rw'"
docker run --rm sentry config generate-secret-key就没有问题,
生成key :
c-))g-4g0=h-t96lu82l7rro++#fif9m^df)i+6@ye#ulksu
然后修改docker-compose.yml 文件中的SENTRY_SECRET_KEY为 'c-))g-4g0=h-t96lu82l7rro++#fif9m^df)i+6@ye#ulksu'
再运行docker run -it --rm -e SENTRY_SECRET_KEY='c-))g-4g0=h-t96lu82l7rro++#fif9m^df)i+6@ye#ulksu' --link sentry-smtp:smtp --link sentry-postgres:postgres --link sentry-redis:redis sentry upgrade
5.运行Sentry server服务
docker run -d --name sentry-cron -e SENTRY_SECRET_KEY='c-))g-4g0=h-t96lu82l7rro++#fif9m^df)i+6@ye#ulksu' --link sentry-smtp:smtp --link sentry-postgres:postgres --link sentry-redis:redis sentry run cron
docker run -d --name sentry-worker-1 -e SENTRY_SECRET_KEY='c-))g-4g0=h-t96lu82l7rro++#fif9m^df)i+6@ye#ulksu' --link sentry-smtp:smtp --link sentry-postgres:postgres --link sentry-redis:redis sentry run worker
6.linux docker build . 报错
/usr/bin/docker-current: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.
After the installation finishes, Docker usually starts up on its own, but for the next part to work you will need to stop it.
sudo service docker stop
Then run the daemon with the following command:
sudo nohup docker daemon -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock &
The script leaves the daemon running in the background, and with the Docker ready you can test that it is accepting commands.
sudo docker info
To make working with Docker easier, you should add your username to the Docker users group. Adding a user to the group can be done with the command underneath by replacing the <username> with your username.
7.shim error: docker-runc not installed on system
ln -s /usr/libexec/docker/docker-runc-current /usr/bin/docker-runc
建立软连接,链接必须放在/usr/bin文件夹下面
9./usr/bin/docker-current: Error response from daemon: Conflict. The container name "/sentry-web" is already in use by container 3cecc20f63c4dd44035faa6a0de07a7cd13faa9a34ea9c6f16497cb5fb689a2e.
docker rm sentry-web
- Bind for 0.0.0.0:8080 failed: port is already allocated.
换个端口docker run -d --name sentry-web -p 8081:9000
11.docker-machine command not found centos
If you are running on Linux: