Skip to content

A simple Docker image to show how to run a Java TCP server in a Docker container

License

Notifications You must be signed in to change notification settings

SoftEng-HEIGVD/Teaching-Docker-SimpleJavaServer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Teaching-Docker-SimpleJavaServer

The goal of this repo is to show how to create a Docker image and how to run containers based on this image.

For this purpose, we have implemented a simple TCP server in Java. The source files are provided, but when we build the image, we use the executable jar file that is already available in the repo.

Building the image

There are two ways to build the image:

  • one option is to build it locally, by running the docker build command;
  • another option to build it on the Docker Hub cloud service

Running a container

To run a container, just use this command:

docker run -p 2205:2205 oliechti/teaching-docker-simplejavaserver

Exploring the image, via a new container

To log into a new container started from the image, use this command:

docker run -it -p 2205:2205 oliechti/teaching-docker-simplejavaserver /bin/bash

About

A simple Docker image to show how to run a Java TCP server in a Docker container

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published