I have created a image locally in my windows system. The image copys the hello world application war file to liberty server. I am able to build and run the image locally in my system. But, I am unable to push the application to bluemix.
This is my docker file :
FROM registry.ng.bluemix.net/ibmliberty:latest
COPY HelloWorldWeb.war /opt/ibm/wlp/usr/servers/defaultServer/dropins/
ENV LICENSE accept
EXPOSE 9080 22
These commands are successful :
$ docker build -t libertytest1 c:/Microservices
$ docker tag libertytest1 registry.ng.bluemix.net/my_ibm/libertytest1
$ docker run --rm -i -t libertytest1
This command fails with below error :
$ docker push registry.ng.bluemix.net/my_ibm/libertytest1
The push refers to a repository [registry.ng.bluemix.net/my_ibm/libertytest1]
9f24cf425f1e: Pushed
5f70bf18a086: Pushed
f5115b19b62d: Pushed
d255f44e3bce: Pushed
3eb8d309e7a4: Pushed
b9ca157916fa: Pushed
9d3eae113364: Pushed
8077bafd5c40: Pushed
86a4f2b11dd6: Pushed
58de70953d07: Pushed
3a497f2a043d: Pushed
612baa4f0341: Pushed
63f90ec2c29b: Pushed
54f3ce62fc73: Pushed
7c7cf479c321: Pushed
manifest invalid: manifest invalid
When I login to bluemix and check my containers, I could not see this container. Please suggest how to resolve this error.
Note : I added a manifest.yml in my war file, but still the same error.
Mostly like you are running with old version of Docker.
manifest invalid: manifest invalid
Please upgrade docker client (at least to v1.8.1) and try push again, you should be fine to push the image.
In Docker 1.10, they've made a change to the way image manifests are generated.
The version of the Docker Registry that the IBM Containers Registry runs doesn't support images built with the new format, so you get the error you see when you try to push.
We're working to get pushes working again using the latest version of Docker, but for now you'll need to do one of the following:
Use the IBM Containers build service: cf ic build -t registry.ng.bluemix.net/my_ibm/libertytest1 c:/Microservices
Downgrade to Docker 1.9 on your machine and run your commands locally as above.
EDIT: the issue has now been resolved. You can push images using Docker 1.10 now.
For anyone using Artifactory I ran into this same issue.
manifest invalid: manifest invalid
The fix was to update permissions for the Artifactory user account so it had both write, overwrite, and delete permissions.
I have the same problem with last versions of docker and cf ic
I solved it building the image directly on Bluemix using cf ic build command
cf ic build -t [Bluemix registry URL] [path to your docker file]
Related
Here is my terminal log (Ubuntu 22.04.1, Docker version 20.10.22, build 3a2c30b):
paul#desktop:~/work/arc/code$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
pauljurczak/arc latest 4f3f22791983 35 minutes ago 880MB
sub-1 latest 4f3f22791983 35 minutes ago 880MB
neo-1 latest 3dcf55bb7458 3 days ago 891MB
arc-tut latest 3a9aee91689b 4 days ago 230MB
paul#desktop:~/work/arc/code$ sudo docker push pauljurczak/arc
Using default tag: latest
The push refers to repository [docker.io/pauljurczak/arc]
An image does not exist locally with the tag: pauljurczak/arc
paul#desktop:~/work/arc/code$ sudo docker push pauljurczak/arc:latest
The push refers to repository [docker.io/pauljurczak/arc]
An image does not exist locally with the tag: pauljurczak/arc
pauljurczak/arc
paul#desktop:~/work/arc/code$ sudo docker push latest
Using default tag: latest
The push refers to repository [docker.io/library/latest]
An image does not exist locally with the tag: latest
I created pauljurczak/arc:latest image as shown there. I'm trying to push it to my pauljurczak/arc repository. The error messages don't make any sense to me. Why pauljurczak/arc in my push command is considered a tag? Why An image does not exist locally with the tag: latest, while there exists several images with that tag? What is happening here? I'm following push command description at https://docs.docker.com/docker-hub/repos/#pushing-a-docker-container-image-to-docker-hub.
When viewing my repository with Chrome, I see this info:
That's exactly what I was doing.
It seems that skipping sudo makes it work. Why is that?
It looks like you have both Docker Desktop and the standalone Docker Engine installed. This means you have two different Docker daemons running. The Docker Engine one is accessible via /var/run/docker.sock, given appropriate permissions; Docker Desktop runs a hidden Linux virtual machine (even on native Linux) and makes a similar socket file available in your home directory.
Docker Desktop uses the Docker CLI "context" feature to point docker at the socket in your home directory. That configuration is also stored in a file in your home directory.
This is where sudo makes a difference. When you run sudo docker ..., and it reads $HOME/.docker/contexts/, that home directory is now root's home directory, probably /root. That doesn't have any of the Docker Desktop related configuration in it, and so you use the default /var/run/docker.sock Docker Engine socket instead.
As you note, just consistently not using sudo will resolve this. (You could potentially need sudo to access the Docker Engine socket, which can all but trivially be used to root the host; the Docker Desktop VM is a little more isolated.) Uninstalling Docker Desktop and making sure to only use the standalone Docker Engine on native Linux also would resolve this.
I'm trying to push a docker image to an Azure container repository and even after successfully "logging in" the push command tries to push it to docker.io and then fails.
Note: I am using Windows 10 Pro and have set up docker to to use the minikube docker dameon
How do I tell docker push to use my Azure container repo?
See the output:
You must tag your image with the Docker Registry URL and then push like this:
docker tag design-service dockerregistry.azurecr.io/design-service
docker push dockerregistry.azurecr.io/design-service
Note: The correct term is registry and not repository. A Docker registry holds repositories of tagged images.
Im building a deployment script in nodejs, with 1 part being calling the gcloud cli through require('child_process').spawn(...); to push the already build docker images. i execute the following command:
gcloud docker -- push myImage
This all works great, the images gets uploaded. But the problem is that gcloud docker opens a new process to push my image and the process i spawned, closes before the pushing of the image is done.
Problem is, I want to delete the builded images locally, directly afterwards.
I've been looking in the gcloud docker documentation but i don't see any argument for this.
Is there a way to know that the process of uploading the images was completed?
edit:
i did find a way to do it only through docker but i'd like a universal solution (both working on windows and linux environments)
After some more research on the google documentation, i found this authentication page
They tell you to create a service account and use the json private key you get as token to use into docker login. This way you don't need an oauth token for your automated services, but you can use this json key instead.
You can check all the images by running this command:
[sudo docker images]
Take a note of the "IMAGE ID" it will used when Tagging and deleting the image.
When you build a docker images, tag it before By running this command:
[docker tag "IMAGE ID" gcr.io/{the Google Container Registry path}:{version} ]
You can push any built image by running this command:
[gcloud docker -- push gcr.io/{the google container registry path}:{version}].
When pushing you will notice that list of container are pushed to your Google Container registry see the example below:
$ sudo gcloud docker -- push gcr.io/{the google container registry path}:{version}
The push refers to repository [gcr.io/{the google container registry path}]
43d35f91f441: =================> Pushed
3b93beb428bf: Layer already exists
629fa6a1373d: =================> Pushed
0f82335d5733: Layer already exists
c216b39a9ab6: Layer already exists
ccbd0c2af699: Layer already exists
38788b6810d3: Layer already exists
cd7100a72410: Layer already exists
v1: digest: sha256:**************************************************************** size: 1992
You can check all the images by running this command:
[sudo docker images]
Take a note of the "IMAGE ID" of the image you need to delete.
Run the command :
[sudo docker rmi "IMAGE ID"].
If the image doesn't allow to be deleted, you have to stop the container that is still running and prune the docker
[sudo docker container stop "the container ID"]
[sudo docker container prune]
Then you can delete the image.
I created a docker repo which I wanted to pull for a local copy.
I want to create an image that can be used by anyone and everyone in the team will have a common work env.
I ran this command on my Ubuntu 14.04 :
docker pull xanthelabs/dev
The output is :
Using default tag: latest
Pulling repository docker.io/xanthelabs/dev
Tag latest not found in repository docker.io/xanthelabs/dev
I am new to docker and dont know what to do to remove this error. What should I be doing?
PS: I've been able to successfully pull images that are already available on the hub like ubuntu:14.04 and centos, so I know the installation is up and working.
To pull images first you need to push something to your repo. I checked https://hub.docker.com/r/xanthelabs/dev/ and it seems that you haven't pushed anything yet.
So first (in directory with your Dockerfile):
docker build --tag xanthelabs/dev .
docker push xanthelabs/dev
And then:
docker pull xanthelabs/dev
For doing pushes you need to be logged in (docker login).
Docker remote api v1.6.:
I am using it to POST and build dockerfile. I can see my newly built images in the json image list output by same remote api, http://docs.docker.io/en/latest/api/docker_remote_api_v1.6/#id20 . During build i'm also tagging it with repository name, http://docs.docker.io/en/latest/api/docker_remote_api_v1.6/#id30.
To push this so generated image on the registry am using docker cli. But the reply from docker cli says
"No such id...".
Since am using docker cli to pull images as well i can't pull it as well.
Please help solving this sync issue in reflecting changes make through docker remote api's into docker cli result?