0

So, I'm brand new to docker (and really containerization in general) and can't figure this out. I'm trying to set up docker to run a datadog synthetic agent, and the instructions datadog gives involve reaching out to "gcr.io" as part of the docker run command. This isn't possible because the box has no outbound internet access, which is a completely separate issue.

The "solution" I came up with was to download a local copy of the remote image on my laptop and then use filezilla to get it on the server:

# curl -O gcr.io/datadoghq/synthetics-private-location-worker:1.36.0
# docker run -d --restart unless-stopped -v $PWD/priv-location.json:/opt/datadog/synthetics-check-runner.json synthetics-private-location-worker:1.36.0
> Unable to find image 'synthetics-private-location-worker:1.36.0' locally

My research has told me that I need to build it as an image, to which I tried:

# docker build -t synthetics-private-location-worker
> "docker build" requires exactly 1 argument(s).

# tar -zcvf synthetics-private-location-worker.tar.gz synthetics-private-location-worker:1.36.0
# docker -D image load -i synthetics-private-location-worker.tar.gz
> open /var/lib/docker/tmp/docker-import-1234/repositories: no such file or directory

I'm at my wit's end and have been trying to figure this out for about 8 straight hours. I don't understand why it can't find that image. The image is in the same directory, I downloaded it. I don't understand why I can't just get it to use it, it's right there.

I know this is probably extremely basic, but can anyone please help?

  • [How run docker images without connect to Internet?](https://stackoverflow.com/questions/48125169/how-run-docker-images-without-connect-to-internet) has a recipe based on `docker pull`, `save`, and `load`; does this work for you? (You probably can't get the image with `curl`, and `docker build` requires the Dockerfile and other source.) – David Maze Jun 21 '23 at 11:10

1 Answers1

0

Usually, if the image is in a .tar.gz format, the command would be docker load -i path/to/image.tar.gz to build the image.

If you have a folder with a Dockerfile inside, from inside the folder you would use docker build -t tag-of-the-image -f Dockerfile .

When an error given is about the number of arguments passed to a command, you are very certainly at fault for not providing enough arguments. At least, it is the first thing to solve.

You should take a look at Docker's documentation!