Docker container default OS and resource utilization

172 views Asked by At

I'm having ubuntu machine and installed Docker container. when I install wildfly from dockerhub by default it has Centos so there is two OS available with this setup(One is ubuntu and another one is centos from docker).

when we run above setup will it cause more resource utilization.

the following is my questions on docker

  1. Do we need centos by default on wildfly container
  2. Docker container cannot refer default OS instead again having another OS
  3. how this setup will work in AWS environment.
1

There are 1 answers

2
Joachim On BEST ANSWER
  1. CentOS is the distro used in the image published by wildfly. However, if you really want to have your container having an Ubuntu layer instead of CentOs you will have to write your own image or spend some time looking for an image using Ubuntu in dockerhub.

  2. The way to use whatever layer you want as an OS use this at the beginning of your Dockerfile: FROM docker.io/ubuntu:18.04, using Ubuntu 18.04 as an example.

  3. It depends of what you call environment. You can use containers by just hosting them on regular EC2 instances. You can also use ECR to host your images on your own repository to pull all the images you created from. You can also use EKS if you want to step into kubernetes.

I really recommend taking some time to review the officiel docker documentation here and the AWS documentation about containers.

Best of luck.