How to edit docker file of the image which is pulled from registry? - dockerfile

I have pulled one image from registry.
I am able to see image using following command :
$docker images
But I am not able to edit its Dockerfile.

You can grab the dockerFile from hub.docker.com -> search the image you want,
Download it make your modification and build it, or run the image downloaded and make your modification, commit it and push it on your docker hub account.
Hope this will help you.

Related

Wso2 mi dashboard create docker image

I am able to run my mi dashboard, (i'm using v4.0.1.17 as it allows me to replace the default H2 database), successfully on Windows. I now want to create a docker image for the same version, but I cannot find it's release in the official GitHub repositories. I tried vainly to build an image for provided version 4.0.1.2 and then replaced the zipped directory with my own 4.0.1.17 one, but it didn't work. Any suggestions would be welcome. Thanks.
You can get the updated docker image for MI Dashboard from the WSO2 Private Docker registry. The page wso2mi-dashboard contains a list of all the docker images released with the update tag.
In your case to pull the v4.0.1.17 you can use the following command,
docker pull docker.wso2.com/wso2mi-dashboard:4.0.1.17
Note that you need to log in to docker.wso2.com with the WSO2 subscription credentials before pulling the image
docker login docker.wso2.com

Django Docker media files save and restore

Hi there I am trying to deploy a project in docker with django and django rest framework. According to the documentation I successfully able to deploy it and it is working fine with media files. I am able to upload media files (images) and it also shows the right file at the right side. But the problem is for some changes I need to re-build the container with new code ... after re-deploying It can not able to found out the previously uploaded media files(images). I badly need help on it.enter image description here
this is my docker-compose file.
enter image description here
and dockerfile

How to add dockerfile to https://hub.docker.com?

After the successful pushing of a docker image, I can see some repo has "Dockerfile" section while some have not.
How to add "Dockerfile" to own repo?
To do this, you need to set up an automated build of a code repository. See the documentation to learn how to set up automated builds.
The basic steps are:
Link a code repository (e.g., GitHub repository) to DockerHub
DockerHub will build a Docker image for that repository using the Dockerfile in the repository. You can configure the location of this file and the image tags.
Once this is set up and your first image is built, you should see the Dockerfile listed on DockerHub.

AWS credentilas in dockerfile while building image

I am newbie to docker and AWS. I wanted to have container running image for Maven and Java. I was able to refer https://github.com/carlossg/docker-maven/blob/master/jdk-8/Dockerfile and could create dockerfile for the same. Through terminal, I could see new container is created , with image of Java and Maven. Upto this point it is simple , took me while to figure out though.
(1) I think this is the way you can always have Maven plus Java image , and there is no other way with lot less files/ coding. Is it right? This is just for my information. The real question is the next one.
(2) If I get image of AWS Cli, once the container starts I can login to AWS using the credentials. I know how to do it using terminal. Not a big deal. If I want to have CI/CD pipeline, where do I provide the command - docker build -t <imageName> . and command to start container. Right now I use mac terminal, but not sure how it would play out in CI/CD. I did research on here but nothing conclusive. Does it go inside .yml file?
(3) How do I send the AWS credentials while building docker image? I do not want to put into dockerfile. How do you guys do it so its safe?

Pushing Fortio in cloud foundry using docker image

I am trying to push Fortio(a load testing tool for microservices) as an application in cloud foundry. I am trying it with a docker image from hub.
cf push <app-name> --docker-image fortio:fortio random-route
Application crashes when it tries to start the application. cf logs says : executable file not found in $PATH
It is working fine in my local docker setup but not in cloud foundry.
Any help??
https://docs.cloudfoundry.org/devguide/deploy-apps/push-docker.html
A Docker image that meets the following requirements:
The Docker image must contain an /etc/passwd file with an entry for the root user. In addition, the home directory and the shell for that root user must be present in the image file system.
Unfortunately, public Docker image fortio/fortio doesn't meet this particular requirement.
Solutions:
build customized Docker app image with shell and /etc/passwd
use source code and push it as a native golang app and not a Dockerized app