HACKER Q&A
📣 WolfOliver

What is the easiest way to run a Docker image in the cloud?


I have a docker image which does not run on my Mac M1 machine. What is the most simplest/cheapest way to run thin on some cloud server and connect to it locally?


  👤 polski-g Accepted Answer ✓
I setup a systemd unit file to run docker-compose.

  [Unit]
  Description=co-docker - start docker instances via docker-compose
  Requires=docker.service
  After=docker.service
  PartOf=docker.service

  [Service]
  Restart=on-failure
  WorkingDirectory=/opt/co-docker/%i
  ExecStart=/usr/bin/docker-compose up
  ExecStop=/usr/bin/docker-compose stop

  [Install]
  WantedBy=multi-user.target