---
title: "docker常用命令"
author: "chzhxu"
date: "2017-11-18T12:21:56Z"
tags: []
categories: ["开源软件"]
slug: "docker"
draft: false
lastmod: "2017-11-24T14:59:02Z"
id: 2400139
url: "https://gangling.iteye.com/blog/2400139"
---

**进入docker容器**


```sh

  docker exec -it discovery /bin/bash

```


**查看当前容器资源使用**

```sh

docker stats

```


**cpu 配置参数**

```sh

 docker help run|grep cpu

```



**内存配置参数**

```sh

 docker help run|grep mem

```

**日志查看**

```sh
docker logs -f  容器名称
```