elasticbeanstalk deployment failing with Error response from daemon: - docker

AWS Elastic Beanstalk failing with error response from daemon:
You cannot remove a running container c911e29b2ce2283bae300645bf2f034f7bf51c07b7ec72c6ebfa133d531a6129.
Stop the container before attempting removal or force remove
Error log bellow:
2020/04/26 07:15:31.279931 [INFO] Running command /bin/sh -c docker rmi `docker images -aq`
2020/04/26 07:15:31.369738 [ERROR] Error response from daemon: conflict: unable to delete 274bac0a2621 (cannot be forced) - image has dependent child images
Error response from daemon: conflict: unable to delete 6040329cd021 (cannot be forced) - image has dependent child images
Error response from daemon: conflict: unable to delete 1020a81a3f38 (cannot be forced) - image is being used by running container c911e29b2ce2
Error response from daemon: conflict: unable to delete 68e7be49c28c (cannot be forced) - image has dependent child images
2020/04/26 07:15:31.369787 [INFO] restore docker image name with command: docker tag 1020a81a3f38 aws_beanstalk/current-app:latest
2020/04/26 07:15:31.369804 [INFO] Running command /bin/sh -c docker tag 1020a81a3f38 aws_beanstalk/current-app:latest
2020/04/26 07:15:31.414707 [INFO] restore docker image name with command: docker tag 68e7be49c28c python:2.7
2020/04/26 07:15:31.414786 [INFO] Running command /bin/sh -c docker tag 68e7be49c28c python:2.7
2020/04/26 07:15:31.462282 [INFO] Running command /bin/sh -c /bin/file -m /opt/elasticbeanstalk/config/private/beanstalk-magic -b --mime-type /opt/elasticbeanstalk/deployment/app_source_bundle
2020/04/26 07:15:31.464666 [INFO] application/zip
2020/04/26 07:15:31.464679 [INFO] app source bundle is zip file ...
2020/04/26 07:15:31.464689 [INFO] extracting /opt/elasticbeanstalk/deployment/app_source_bundle to /var/app/current/
2020/04/26 07:15:31.464703 [INFO] Running command /bin/sh -c /usr/bin/unzip -q -o /opt/elasticbeanstalk/deployment/app_source_bundle -d /var/app/current/
2020/04/26 07:15:31.475355 [INFO] finished extracting /opt/elasticbeanstalk/deployment/app_source_bundle to /var/app/current/ successfully
2020/04/26 07:15:31.475367 [INFO] Executing instruction: RunPreBuildHooks
2020/04/26 07:15:31.475381 [INFO] The dir .platform/hooks/prebuild/ does not exist in the application. Skipping this step...
2020/04/26 07:15:31.475385 [INFO] Executing instruction: Docker Specific Build Application
2020/04/26 07:15:31.475404 [INFO] start build docker app
2020/04/26 07:15:31.475414 [INFO] fetch image name
2020/04/26 07:15:31.475437 [INFO] authenticate with ECR if the image is in an ECR repo
2020/04/26 07:15:31.475442 [INFO] pull docker image if update is not false in dockerrun.aws.json
2020/04/26 07:15:31.475455 [INFO] Running command /bin/sh -c docker pull node:alpine as builder
2020/04/26 07:15:31.516536 [ERROR] "docker pull" requires exactly 1 argument.
See 'docker pull --help'.
Usage: docker pull [OPTIONS] NAME[:TAG|#DIGEST]
Pull an image or a repository from a registry
2020/04/26 07:15:31.516557 [WARN] failed to execute command: docker pull node:alpine as builder, retrying...
2020/04/26 07:15:31.516577 [INFO] Running command /bin/sh -c docker pull node:alpine as builder
2020/04/26 07:15:31.557381 [ERROR] "docker pull" requires exactly 1 argument.
See 'docker pull --help'.
Usage: docker pull [OPTIONS] NAME[:TAG|#DIGEST]
Pull an image or a repository from a registry
2020/04/26 07:15:31.557405 [ERROR] An error occurred during execution of command [app-deploy] - [Docker Specific Build Application]. Stop running the command. Error: failed to pull docker image: Command /bin/sh -c docker pull node:alpine as builder failed with error exit status 1. Stderr:"docker pull" requires exactly 1 argument.
See 'docker pull --help'.

We had a problem like this on the following Platform: Docker running on 64bit Amazon Linux 2/3.0.0
Switching to Docker running on 64bit Amazon Linux/2.14.3 solved the problem - Docker image builds as expected.

Related

Error during installing Docker on Windows Server 2016 (VMware Workstation)

I want to install and use docker on Server 2016 without docker dekstop(not supported). I am getting this error.
PS C:\Users\Administrator> docker run -t -i mcr.microsoft.com/windows/nanoserver:1809
Unable to find image 'mcr.microsoft.com/windows/nanoserver:1809' locally
1809: Pulling from windows/nanoserver
e2d245a3ce95: Extracting
[==================================================>] 103.3 MB/103.3 MB
C:\Program Files\docker\docker.exe: failed to register layer: re-exec
error: exit status 1: output: ProcessUtilityVMImage C:\ProgramData\docker\windowsfilter\a579423b585e834a4d02960cf2a96cccd4b69b4bfab7811774de7a83ad168729\UtilityVM:
The system cannot find the path specified..
See 'C:\Program Files\docker\docker.exe run --help'.
Thanks in advance for your help.
I was unable to install windowsServerCore container image with previous commands and then I entered the command: "docker run -t -i mcr.microsoft.com/windows/nanoserver:1809" to reach to offical page.

vcluster development install: docker: unknown flag: --tag

I am setting up vcluster for development: docs
devspace run dev
....
[info] Using namespace 'vcluster'
[info] Using kube context 'vhost'
[done] √ Created namespace: vcluster
[info] Rebuild image because tag is missing
[info] Building image 'ghcr.io/loft-sh/loft-enterprise/dev-vcluster:kSukXFs' with engine 'buildkit'
[info] Execute BuildKit command with: docker buildx build --tag ghcr.io/loft-sh/loft-enterprise/dev-vcluster:kSukXFs --push --file Dockerfile --target builder -
unknown flag: --tag
See 'docker --help'.
Usage: docker [OPTIONS] COMMAND
...
Run 'docker COMMAND --help' for more information on a command.
To get more help with docker, check out our guides at https://docs.docker.com/go/guides/
[fatal] error building image ghcr.io/loft-sh/loft-enterprise/dev-vcluster:kSukXFs: exit status 125
Is my version of docker too old?
I am using Docker version 20.10.12

How do I use gitlab-runner exec docker correctly?

I am trying to run the gitlab pipeline jobs locally in order to test and debug.
Here is what I did:
Installed gitlab-runner on my local machine.
sudo gitlab-runner exec docker --docker-privileged --builds-dir /tmp/builds --docker-volumes /home/fox/Work/docker/core-application:/core-application Rspec
This gives:
Runtime platform arch=amd64 os=linux pid=632331 revision=8fa89735 version=13.6.0
Running with gitlab-runner 13.6.0 (8fa89735)
Preparing the "docker" executor
Using Docker executor with image docker:19.03.6 ...
Starting service docker:19.03.6-dind ...
Pulling docker image docker:19.03.6-dind ...
Using docker image sha256:a33335bfe8302f4d8a7688bc1fa539f2aba787ec724119be53adc4681702a3e7 for docker:19.03.6-dind with digest docker#sha256:a4f33d003b7ec9133c2a1ff61f4e80305b329c0fa8b753140b9ab2808f28328c ...
WARNING: Service docker:19.03.6-dind is already created. Ignoring.
Waiting for services to be up and running...
*** WARNING: Service runner--project-0-concurrent-0-aef5122f9d27e6f0-docker-0 probably didn't start properly.
Health check error:
service "runner--project-0-concurrent-0-aef5122f9d27e6f0-docker-0-wait-for-service" timeout
Health check container logs:
....
*********
Pulling docker image docker:19.03.6 ...
Using docker image sha256:6512892b576811235f68a6dcd5fbe10b387ac0ba3709aeaf80cd5cfcecb387c7 for docker:19.03.6 with digest docker#sha256:3eb67443c54436650bd4f1e97ddf9ab1797d75e15d685c791f6c6397edaa6d82 ...
Preparing environment
Running on runner--project-0-concurrent-0 via fox...
Getting source from Git repository
Fetching changes...
Initialized empty Git repository in /tmp/builds/project-0/.git/
Created fresh repository.
fatal: not a git repository: /home/fox/Work/docker/core-application/../.git/modules/core-application
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
ERROR: Failed to cleanup volumes
ERROR: Job failed: exit code 1
FATAL: exit code 1
Then I tried to do it with a gitlab-runner image on the local machine:
docker run --name=runner --privileged -t --rm -v /var/run/docker.sock:/var/run/docker.sock -v /tmp/.gitlab-runner/:/etc/gitlab-runner -v ${PWD}:${PWD} --workdir $PWD gitlab/gitlab-runner exec docker --builds-dir /tmp/builds/ Rspec
I get:
Runtime platform arch=amd64 os=linux pid=7 revision=8fa89735 version=13.6.0
fatal: not a git repository: /home/fox/Work/docker/core-application/../.git/modules/core-application
WARNING: You most probably have uncommitted changes.
WARNING: These changes will not be tested.
fatal: not a git repository: /home/fox/Work/docker/core-application/../.git/modules/core-application
FATAL: exit status 128
Here is what the gitlab documentation says:
If you want to use the docker executor with the exec command, use that
in context of docker-machine shell or boot2docker shell. This is
required to properly map your local directory to the directory inside
the Docker container.
There are no examples. I googled it, but nothing turned out around docker+machine and gitlab-runner.
Can someone tell me how to do it correctly? Any sample?
Thanks.
You have to execute the command from the root folder of your git repository/project:
$ ls -a
./
../
.git/
.gitignore
.gitlab-ci.yml
Makefile
$ gitlab-runner exec docker <job_name>
You are using docker commands which you shouldn't as gitlab-runner already uses those under the hood.
See $ gitlab-runner exec docker --help for more info on the command.

Installing Hydra image from a Docker Hub repository gives error: OCI runtime create failed: container_linux.go:346

I am trying to pull a hydra image using the following shell script. This script is supposed to pull the image from a docker repository and then configure it based on the needs of the server:
echo "Getting Hydra image from hub.docker.com"
docker pull linuxserver/hydra
echo "-----------------"
echo "Importing Hydra database..."
docker run -it --rm --entrypoint hydra linuxserver/hydra migrate sql $DATABASE_URL_HYDRA
echo "-----------------"
However, when I run this script, I get the following error:
docker: Error response from daemon: OCI runtime create failed: container_linux.go:346: starting container process caused "exec: \"hydra\": executable file not found in $PATH": unknown.
ERRO[0000] error waiting for container: context canceled

docker failed to register layer error processing

I've just finished to install docker on ubuntu 16.04.
My docker version is 17.12.0-ce, build c97c6d6
I start my docker with
sudo service docker start
and it starts running. when i try to run
docker run hello-world
i get the following message
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
ca4f61b1923c: Extracting
[==================================================>] 985B/985B
docker: failed to register layer: Error processing tar file(exit status 1):
invalid argument.
Can't figure out what's going on.

Resources