on the website digitalocean found an example of how to deploy a docker site using the yml file

wordpress: image: wordpress links: - wordpress_db:mysql ports: - 8080:80 wordpress_db: image: mariadb environment: MYSQL_ROOT_PASSWORD: examplepass phpmyadmin: image: corbinu/docker-phpmyadmin links: - wordpress_db:mysql ports: - 8181:80 environment: MYSQL_USERNAME: root MYSQL_ROOT_PASSWORD: examplepass 

I want from this example instead of wordpress image to substitute my image and the rest of the assembly to be as in the example.
The question is how to properly "make" an image if I want to make it from my image? For example, I created my own turnip on hub.docker.com - I started the repository there and now I want to "bring it to mind" but the original Dockerfile file is no longer there to install additional software on the image and change it to rebuild again.

Please tell me how to act in such cases. PS: I am going to pull up the code from the git repository during the build, in order to do edits to git, if necessary, or what is the best way to proceed?

  • one
    "I want to substitute my image from this example instead of wordpress image"? So it ... take ... and substitute. What prevents something? - D-side
  • Well, let's say I created a docker pull turnip igoracrapp / medicalappmrt (in fact, I don’t need anything there) from this I want to do something that will be mounted. What is not clear is workflow. For example, from git - everything is elementary - pulled off a turnip, made edits - added \ deleted something further commit and pushed. Sten is now a turnip - let's say the state is tightened if I need to change the assembly, then how do I change the image? - Igor Kalamurda
  • How can I edit the Dockerfile? - Igor Kalamurda
  • 2
    Most likely, you will not make changes to the image itself. This is possible, but not typical. You’ll rather make changes to the Dockerfile itself; as a result of its reassembly, you will get a new version of the image. The "version tree" as such will not grow "up", as in git , but "sideways", as if git commit --amend was constantly being done, only instead of commits of the image state. You now have a dump of vague questions in the question, reduce it to something specific, and divide it into several separate exact questions, if necessary. - D-side
  • one
    Yes, about. docker-compose even has a build directive that collects the image from the specified folder, and does not take it from the Hub. M ... it seems that part of the question was in this and I am already beginning to answer in the comments, which is not good. Share :) - D-side

0