skip to Main Content

I built docker-compose.yml file. After building of it there was created new image. But this image isn’t complete because the app doesn’t work after running it. So. the app works only when run docker-compose up. I want to deploy the project to Docker hub. I found the solution with nginx. Please tell me how it’s possible without third apps (e.g. nginx) and if the image doesn’t work?

2

Answers


  1. You don’t.

    DockerHub is service where you can share container images. If you created a custom Dockerfile specific for your application, then yes you could build an image for it and publish it either in a private or public repository. For creating images, check the Dockerfile best practices section.

    Login or Signup to reply.
  2. Add sample docker-compose.yaml to README.md and push it to docker registry using docker-pushrm as shown in docker-pushrm documentation:

    $ ls
    Dockerfile  README.md
    $ docker login
    Username: my-user
    Password: ********
    Login Succeeded
    $ docker build -t my-user/hello-world .
    $ docker push my-user/hello-world
    $ docker pushrm my-user/hello-world
    

    Dockerfile, example docker-compose.yaml and other getting-started instructions usually shared by README.md. E.g. Dockerhub can render and display documentation in Markdown format.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search