docker-machine

Is it safe to clean docker/overlay2/

左心房为你撑大大i 提交于 2019-12-31 09:07:07
问题 I got some docker containers running on AWS EC2, the /var/lib/docker/overlay2 folder grows very fast in disk size. I'm wondering if it is safe to delete its content? or if docker has some kind of command to free up some disk usage. Thanks! UPDATE: I actually tried docker system prune -a already, which reclaimed 0Kb. Also my /docker/overlay2 disk size is much larger than the output from docker system df After reading docker documentation and BMitch's answer, I believe it is a stupid idea to

Docker machine timeout - how to fix without destroying the machine?

試著忘記壹切 提交于 2019-12-31 08:34:28
问题 I'm having a recurring problem with Docker Machine - every few days it decides to timeout and I am unable to recover it once this happens. Example docker-machine ls NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS default virtualbox Timeout Environment Info uname -a Darwin ColeyMBPR 15.4.0 Darwin Kernel Version 15.4.0: Fri Feb 26 22:08:05 PST 2016; root:xnu-3248.40.184~3/RELEASE_X86_64 x86_64 docker version 1.11.0 docker-machine version 0.7.0 vboxmanage --version 5.0.20r106931 Attempted

Docker - image operating system “windows” cannot be used on this platform

≡放荡痞女 提交于 2019-12-31 08:34:13
问题 I tried this on my Windows 10 machine: Dockerfile: From microsoft/nanoserver CMD ["echo", "Hello World"] PS C:\FSD\Docker\Trial1> docker build -t lea/leatest . Sending build context to Docker daemon 2.048kB Step 1/2 : FROM microsoft/nanoserver latest: Pulling from microsoft/nanoserver bce2fbc256ea: Pulling fs layer 58f68fa0ceda: Pulling fs layer image operating system "windows" cannot be used on this platform 回答1: Your Docker host is configured to run Linux containers inside of a VM. To run

How to clear the logs properly for a Docker container?

早过忘川 提交于 2019-12-31 08:04:29
问题 I use docker logs [container-name] to see the logs of a specific container. Is there an elegant way to clear these logs? 回答1: From this question there's a one-liner that you can run: echo "" > $(docker inspect --format='{{.LogPath}}' <container_name_or_id>) I'm not a big fan of modifying Docker's files directly with this, a truncate command, or log rotate, since each are external to docker. The external log deletion could happen while docker is writing json formatted data to the file,

share windows folder (other than c/Users/) with docker container (using docker windows client)

安稳与你 提交于 2019-12-29 07:57:07
问题 Using docker client, is there a way to share a folder in windows with a docker container without having to first share the folder via the Virtual Box VM. Have understood the need of having a double slash from this and this Ran the following command from the docker client for windows docker run -it -v //F/devfolder:/development/windev <imagename> <cmdname> but when did a ls on /development/windev , it turned out it was empty. I did not have any problem when I tried mounting the c/Users

How to set up a data volume within docker?

心不动则不痛 提交于 2019-12-25 08:03:12
问题 I am trying to set up rocker/rstudio docker on a linux ubuntu 14.04.5 with a data volume so all my data is outside of the docker. I have looked at Manage data in containers for some some guidance. sudo docker run -d -p 8787:8787 rocker/rstudio -v ~/data/ I get back the following error: docker: Error response from daemon: invalid header field value "oci runtime error: container_linux.go:247: starting container process caused \"exec: \\"-v\\": executable file not found in $PATH\"\n". 回答1: Your

docker out of disk space

谁说我不能喝 提交于 2019-12-25 06:39:36
问题 I'm hainvg trouble with docker and volume size. I'm running docker-machine with three containers. The one giving me trouble is the MySQL container which has a data-only container for persistance. When I try to import a mysql file, mysql complains that the table is full, which really means that the disk is out of space. Looking at the system, I see the problem, but don't know how to correct it: _ _ ____ _ _ | |__ ___ ___ | |_|___ \ __| | ___ ___| | _____ _ __ | '_ \ / _ \ / _ \| __| __) / _` |

not able to access angular2 app from docker container

你离开我真会死。 提交于 2019-12-25 04:29:34
问题 I created a docker container using official node image. docker pull node then I created an angular 2 app using angular-cli. ng new docker-demo then I ran my docker container from the directory of my angular2 app using following command: cd docker-demo & then inside the directory : docker run -p 8080:4200 -v $(pwd):/var/www -w "/var/www" node npm start where pwd stands for directory of my angular2 app. now in my console I can see my angular2 app getting bundled & running just like it runs on

ERROR: serverlessrepo 0.1.8 has requirement pyyaml~=3.12

蹲街弑〆低调 提交于 2019-12-24 22:50:17
问题 Below is the docker file with base image python 3.7: FROM python:3.7-alpine3.9 ENV HOME /home/someteam ENV PATH $HOME/.local/bin:$PATH RUN ln -fs /usr/share/zoneinfo/Etc/UTC /etc/localtime RUN apk add --no-cache --virtual .build-deps python2-dev python3-dev gcc linux-headers musl-dev && \ addgroup someteam --gid=5566; \ adduser -G someteam -Du 5566 -h /home/someteam -s /bin/bash someteam; \ chown -R someteam $HOME; RUN apk add --no-cache groff less bash jq curl py-pip tzdata USER someteam

Issue mounting docker volume with docker-compose

我是研究僧i 提交于 2019-12-23 12:55:39
问题 My Scenario I am trying to build docker swarm with docker-compose.yml file version: '3' services: myapp-nginx: image: nginx:1.10 volumes: - ./nginx/certs:/etc/nginx/certs ports: - 80:80 - 443:443 using build command as below $ docker stack deploy --compose-file docker-compose.yml myapp Creating network myapp_default Creating service myapp_myapp-nginx My system have Docker Version 17.03.1-ce-mac5 (16048) Problem Volumes mounts are not working, If I comment out volumes: - ./nginx/certs:/etc