2

I have some questions regarding docker.

In docker image template, there is template that define for Ubuntu.

1) May I know is it possible to build and run this Ubuntu docker image on Redhat server?

2) Is it possible to use this docker image as environment for development for solution that use debian dependencies packages?

I not sure whether such question can be asked in this forum. if no, please enlighten me to the correct forum to raise such question.

3 Answers 3

0
  1. You can run that image on Windows/macOS/Linux and so on as long as docker is installed. See: List of all environments.
  2. "Development for a solution" is a bit confusing though. It is more like encapsulation on container level (OOP encapsulation). Containers allow a developer to package up an application with all of the parts it needs, such as libraries and other dependencies.
2
  • i mean running as an environment platform for code development
    – Esther
    Commented Oct 18, 2018 at 7:25
  • Without any GUI you can build a platform for coding without knowing what kind of development you are onto. For instance for python you can do that without docker with known isolation methods.Building development environment with docker for testing purpose sounds fine but for usual production sounds new.If you could be more specific regarding your purpose and what environment you are willing to do I think it would be more helpful
    – hakkican
    Commented Oct 18, 2018 at 9:49
2
  1. Sure. You can run a Linux-based Docker image on any Linux host.
  2. Yes, it is possible. You can run & develop in a debian-based docker container.
0
0

Yes you can run Docker on any Linux distro. These steps listed below are for Ubuntu Desktop 18 LTS. You can find the full official docs and steps for other Linux distributions here:

Ubuntu: https://docs.docker.com/install/linux/docker-ce/ubuntu/

Fedora: https://docs.docker.com/install/linux/docker-ce/fedora/

CentOS: https://docs.docker.com/install/linux/docker-ce/centos/

Debian: https://docs.docker.com/install/linux/docker-ce/debian/

Installing Docker

The Docker docs suggest setting up a Docker repository to install and update from.

This is where you should start:

https://docs.docker.com/install/linux/docker-ce/ubuntu/#set-up-the-repository

After completing the installation steps, test out Docker:

sudo docker run hello-world

This should download and run the test container printing "hello world" to your console.

Installing Docker Compose

Unlike the Mac and Windows Docker Desktop versions, we must manually install Docker Compose. See the instructions for the installation steps (Click on the tab for Linux)

https://docs.docker.com/compose/install/#install-compose

After completing, test your installation:

docker-compose -v

This should print the version and build numbers to your console.

Run without Sudo

Follow these instructions to run Docker commands without sudo:

https://docs.docker.com/install/linux/linux-postinstall/#manage-docker-as-a-non-root-user

The docker group will likely already be created, but you still need to add your user to this group.

Start on Boot

Follow these instructions so that Docker and its services start automatically on boot:

https://docs.docker.com/install/linux/linux-postinstall/#configure-docker-to-start-on-boot

You may need to restart your system

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.