0

How to make two images in one docker container? Not using docker-compose and Dockerfile. I need to run the Samba and SFTP image in the same container

milenao
  • 707
  • 1
  • 6
  • 8
  • 1
    You cannot "make two images in one docker container". A container is what you get when you "run" an image. You can certainly build an image that contains both Samba and an sftp service and arrange to start them both, but that is an anti-pattern and leads to an image that is more complicated, less manageable, and more difficult to scale. – larsks Mar 25 '23 at 19:46
  • @larsks How can I build an image from Samba and SFTP? and there you can not do without the Dockerfile – milenao Mar 25 '23 at 19:50
  • I need this for Nomad configuration change – milenao Mar 25 '23 at 19:54
  • Remember that a Docker container only runs a single program. So if you could combine these two servers into a single program, that could be the main application in its container. It sounds like you're trying to put two unrelated servers into the same container, though, and it's almost always a better practice to run them in two separate containers. – David Maze Mar 26 '23 at 01:34

0 Answers0