0

I know similar questions have been asked but I couldn't get it working or it was not specific enough for me since I am fairly new to dockers. The question is similar to the question in this thread How to move Docker containers between different hosts? but I don't fully understand the answer or I can't get it working.

My problem: I am using docker Desktop to run a python script locally in a container. But I want this python script to be able to run on a windows server 2016. The script is a short webscraper which creates a csv file.

I am aware I need to install some sort of docker on the webserver and I need to export my container and be able to load in the container at the webserver.

In the thread referred above it says that I need to use docker commit psscrape but when I try to use it.

I get: "Error response from daemon: No such container: psscraper." This is probably since the container has ran but stopped. Since the program runs only for a few seconds. psscraper is in the 'docker ps -a' list but not in the 'docker ps' list. I guess it has something to do with that.

psscraper is the name of the python file.

Is there anyone who could enlighten me on how to proceed?

Hestaron
  • 190
  • 1
  • 8
  • 1
    If you build a Docker image, you can either `docker push` it to a registry like Docker Hub, or commit the Dockerfile to source control and `docker build` it on the remote system. `docker commit` is usually a mistake. You might look at tutorials like Docker's [Build and run your image](https://docs.docker.com/get-started/part2/) that walk through the standard sequence of building and running an image. – David Maze Jul 08 '20 at 11:20
  • Ah, I indeed managed to fix the problem with a docker push. Now I'm getting stuck with pulling the image to a docker enterprise server. But I guess that's a completely different problem. – Hestaron Jul 13 '20 at 10:00

0 Answers0