0

I have bought a space from a host service already and published my files into it and it is currently running successfully.

Now, I have started to learn Docker and use it's advantages like Containerize. I would like to have several instances of my application running on the remote host, in order to achieve this I need several Containers that are using the same image(my application). In order to achieve this I have created an Image and Containers and pushed them to DockerHub, no I want to pull and download them on the remote host, in order to see the Containers via their online address. Now my question is, do I need the Docker to be installed on the remote host? If the remote host is not a dedicated server but the shared one, do I need to install the Docker on it still? Or there is any other way that I am not aware about?

The project is SPA (ANGULAR + ASP.NET WEB API + SQL SERVER)

  • you need a [dockerd](https://docs.docker.com/engine/reference/commandline/dockerd/) (see **d** at the end) to run docker containers – vasily.sib Sep 19 '19 at 08:35
  • @vasily.sib But what if, the remote hosting company doesn't support the Docker? –  Sep 19 '19 at 08:36
  • You may ask support service or find another one – vasily.sib Sep 19 '19 at 08:38
  • @vasily.sib So you mean the remote hosting company, need to install the Docker Desktop? Same as mine that I have already installed? Or they need to install a different instance of it, I am afraid I've been confused about the dockerd(d) that you mentioned. –  Sep 19 '19 at 08:40
  • It depends on what their host OS. Also, if they are on windows, you may find [this link](https://stackoverflow.com/a/40320748/2716623) interesting. – vasily.sib Sep 19 '19 at 09:12
  • also, [here](http://alexander.holbreich.org/docker-components-explained/) you can find a well described structure of docker components – vasily.sib Sep 19 '19 at 09:13

1 Answers1

2

Yes, you have to install Docker on your remote host in order to run your image.

If the remote host is a shared one, though, chances are that you are not allowed to install Docker there for security reasons. If you're allowed to run Docker containers on a host, you have effectively root access.

EDIT

Since the question about "effectively root access" came up:

Supposed you're on a shared hoster where each user has its environment under /home/user. Now imagine your user can run Docker commands, i.e. is in the docker group. You could simply run docker run -v /home/anotheruser:/iamaspy alpine and you could access another user's content in the container on the path /iamaspy. Have a look at the docker docs for further information. Here you can also find a more elaborate SO answer than mine.

bellackn
  • 1,939
  • 13
  • 22
  • 1
    What's your mean by "you have effectively root access"? –  Sep 19 '19 at 08:42
  • Also please verify, to install Docker on my remote host, do I need to install the Docker Desktop? Same as mine that I have already installed on my local windows machine? Or they need to install a different instance of it? –  Sep 19 '19 at 08:47
  • I have a big doubts about _"you have effectively root access"_ too. Can you please share a link to docker docs or maybe some blog posts where this is proved? – vasily.sib Sep 19 '19 at 09:10
  • @J.P. Your remote host is pretty likely a Linux server, so there is no Docker desktop. On Linux environments, you can directly install Docker, c.f. [here](https://docs.docker.com/install/linux/docker-ce/ubuntu/). Otherwise, please update your question with more info about your remote host. – bellackn Sep 19 '19 at 09:36
  • @bellackn The remote host is Windows server, so, it means, the docker desktop needs to be installed. OK? –  Sep 19 '19 at 10:11
  • I'm not familiar with Windows Server, but one way or another, you have to run a Docker daemon on this machine. I fear that, especially for a beginner, Windows Server isn't the best environment to get started :) I don't know if regular Docker Desktop works there as there seems to be a special Enterprise solution, cf. [here](https://docs.docker.com/install/windows/docker-ee/). – bellackn Sep 19 '19 at 10:22