Skip to content

Latest commit

 

History

History
76 lines (50 loc) · 1.72 KB

README.md

File metadata and controls

76 lines (50 loc) · 1.72 KB

About the Virtual Server Container

If you have any problem, issue that!

Build First

After you clone this repo first, run this:

docker compose up --build -d
  • --build: Build images before starting containers.
  • -d, --detach: Detached mode: Run containers in the background.

Please check your 22 and 80 ports. If they are occupied, the container will start failing.

How to Check Which Ports Are Open on a Windows 10 PC

Start the container

This command does not build or rebuild the image. If you deploy first or update the dockerfile, read Build First.

docker compose up -d

Login with root

You cannot login root with SSh. You need to use exec caommand to login. Run this:

docker exec -it debian bash
  • -i, --interactive: Keep STDIN open even if not attached
  • -t, --tty: Allocate a pseudo-TTY
  • debian: Container name.
  • bash: Command.

You will learn Docker in this semester from NYCUSDC.

After Start

You can use SSH login into container.

ssh debian@localhost

The default password is debian.

Stop Container

If you want to keep your changes and want temporary stop the container, do this:

docker compose stop

Remove Container

If you want to remove the container and your all changes, do this:

docker compose down