Docker Build Command Termination - docker

I am getting error while running docker build . command on my terminal. Process is getting terminated.
Here's what I have written in Docker file
# Step1 specify the base image
FROM alpine
# Download and install dependencies
RUN apk add --update redis
# Setup the startup command
CMD ["redis-server"]
and Here's what I am getting in the terminal
Sending build context to Docker daemon 2.048kB
Step 1/3 : FROM alpine
Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io on 10.0.2.3:53: read udp 10.0.2.15:52211->10.0.2.3:53: i/o timeout
Please review it and suggest me a solution to overcome it.
I tried to Build custom Image but Command is getting terminated.

Related

RUN systemctl start newrelic-infra,error :Failed to get D-Bus connection: Operation not permitted

RUN systemctl start newrelic-infra(while building docker file) on cent os 7
We obtain the following error message:
Step 28/28 : RUN systemctl start newrelic-infra
---> Running in f9a82da02f00
**Failed to get D-Bus connection: Operation not permitted**
The command '/bin/sh -c systemctl start newrelic-infra' returned a non-zero code: 1
Even after including these steps in docker file,
I am getting the same error. How do we resolve it
The mounted volume may work during runtime of the container but not during build.
In many cases you do not need to run systemd in container anyway as you can run "systemctl" commands with the docker-systemctl-replacement scripts.

docker image build failing;operating system is not supported

I am following 'kubernetes-for-java-developers' Arun gupta's tutorial for learning docker/kubernetes.
https://github.com/arun-gupta/kubernetes-for-java-developers
I am failing in this particular step
docker image build --file Dockerfile.jre -t arungupta/greeting:jre-slim .
while I am using docker desktop, windows container, getting below messege.
F:\Work\Workspace\IntellejIdea\kubernetes-for-java-developers\app>docker
image build --file Dockerfile.jre -t arungupta/greeting:jre-slim .
Sending build context to Docker daemon 219.5MB
Step 1/7 : FROM debian:9-slim
operating system is not supported
while I am using docker desktop, linux container, getting below messege on running below command
docker container run -d -p 8090:8080 arungupta/greeting:jre-slim
F:\Work\Workspace\IntellejIdea\kubernetes-for-java-developers\app>docker container run -d -p 8090:8080 arungupta/greeting:jre-slim
db92a3cc25635d1d2a7f02cd7c94dd11af6b17ea5b258dcaf740de93a05221f7
docker: Error response from daemon: OCI runtime create failed: container_linux.go:344: starting container process caused "exec: \"./myjre/bin/java\": stat ./myjre/bin/java: no such file
or directory": unknown.
My operating system is windows 10 pro.
Dockerfile.jre
FROM debian:9-slim
COPY target/app.war /root
COPY myjre /root/myjre
EXPOSE 8080 5005
WORKDIR /root
ENV _JAVA_OPTIONS '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005'
CMD ["./myjre/bin/java", "-jar", "app.war"]
As I am new on this docker/kubernetes technology, not sure where to start debugging, or the issues.
help appreciated!!

Pull access denied in docker run command

I have the below code to build an image
docker build -t provisioner-builder:latest -f images/provisioner/Dockerfile.builder .
Right after this build command I have this line
docker run provisioner-builder:latest /bin/true
The docker run command always throws this error in jenkins
06:23:44 Successfully tagged provisioner-builder:latest
06:23:44 docker run provisioner-builder:latest /bin/true
06:23:45 docker: Error response from daemon: Error response from daemon: pull access denied for provisioner-builder, repository does not exist or may require 'docker login'.
06:23:45 See 'docker run --help'.
SO out of 15 runs in jenkins, the above step fails at-least 10-11 times. I get lucky very rarely. I am not trying to pull image as the image is already present in local [I tested by doing a docker images right after the build command and the image was locally present].
I dont understand why this command fails most of the times.

fabric up the network failed

When I execute the command ./byfn.sh -m up
The following error occurs:
Starting with channel 'mychannel' and CLI timeout of '10' seconds and CLI delay of '3' seconds
Continue? [Y/n] y
proceeding ...
docker: Cannot connect to the Docker daemon at tcp://127.0.0.1:4243. Is the docker daemon running?.
See 'docker run --help'.
LOCAL_VERSION=1.1.0-rc1
DOCKER_IMAGE_VERSION=
=================== WARNING ===================
Local fabric binaries and docker images are
out of sync. This may cause problems.
===============================================
ERROR: Couldn't connect to Docker daemon. You might need to start Docker for Mac.
ERROR !!!! Unable to start network
Fetch bootstrap.sh from fabric repository using
curl -sS https://raw.githubusercontent.com/hyperledger/fabric/master/scripts/bootstrap.sh -o ./scripts/bootstrap.sh
Change file mode to executable
chmod +x ./scripts/bootstrap.sh
Download binaries and docker images
./scripts/bootstrap.sh [version]
You have to re-sync the docker images first:
fabric-samples/scripts$ sudo ./fabric-preload.sh
Make sure you have the right version set in the script. In your case VERSION=1.1.0-rc1
you have to give the permission, try
sudo ./byfn.sh -m up
This message caused from your Docker Daemon since it not started yet, please start your docker first.
You are trying to use diiferent versions of the Fabric and the Docker images.
you can update the yum and docker's version,use:yum update,and url of docker:https://docs.docker.com/install/linux/docker-ce/centos/

Tensorflow Serving on Docker | write too long

Trying to follow the tutorial "Using TensorFlow Serving via Docker": https://tensorflow.github.io/serving/docker
I'm getting the error below:
$ docker build --pull -t $USER/tensorflow-serving-devel -f Dockerfile.devel .
ERRO[1791] Can't add file /Users/bone/.docker/machine/machines/testD/disk.vmdk to tar: archive/tar: write too long
Sending build context to Docker daemon 194.3 GB
Error response from daemon: Untar re-exec error: exit status 1: output: write /.docker/machine/machines/default/disk.vmdk: no space left on device
The mistake was running this command on the command line outside the docker machine. Once this command was run inside the docker machine, it worked fine.

Resources