Currently I’m planning to dockerize some web applications but I didn’t find a reasonably easy way do create the images to be hosted in my repository so I can pull them on my server.

What I currently have is:

  1. A local computer with a directory where the application that I want to dockerize is located
  2. A “docker server” running Portainer without shell/ssh access
  3. A place where I can upload/host the Docker images and where I can pull the images from on the “Docker server”
  4. Basic knowledge on how to write the needed Dockerfile

What I now need is a sane way to build the images WITHOUT setting up a fully featured Docker environment on the local computer.

Ideally something where I can build the images and upload them but without that something “littering Docker-related files all over my system”.

Something like a VM that resets on every start maybe? So … build the image, upload to repository, close the terminal window, and forget that anything ever happened.

What is YOUR solution to create and upload Docker images in a clean and sane way?

you are viewing a single comment's thread
view the rest of the comments
[–] 1 point 2 years ago* (1 child)

as a user with root permission or as root ?

  • source
  • parent
  • hideshow 2 child comments
  • [–] 8 points 2 years ago* (last edited 2 years ago) (1 child)

    You shouldn't need sudo to run docker, just can create a docker group and add your user to it. This will give you the steps on how to run docker without sudo.

    Edit: as pointed out below, please make sure that you're comfortable with giving these permissions to the user you're adding to the docker group.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 3 points 2 years ago (1 child)

    run docker without sudo.

    Doing that, you effectively give the user account root access without password

    docker run --volume /etc:/host_etc debian /bin/bash -> can read/write anything below the host's /etc directory, including shadow file, etc.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 2 points 2 years ago* (last edited 2 years ago)

    True.

    But I assume OP was already running docker from that user, so they are comfortable with those permissions.

    Maybe should have made it clearer. Added to my other post. Thanks!

  • source
  • parent