Finding the layers and layer sizes for each Docker image
Check out dive written in golang. Awesome tool!
Check out dive written in golang. Awesome tool!
How to configure the docker image for the Jenkin to create the Android build?
I think the issue is that you are behind the proxy which in which case you need to write a manual configuration in Docker systemd service file. That will override the default docker.service file. If you are using Docker for Windows, then simply set the default DNS to 8.8.8.8 on the “vEthernet (DockerNAT)” network adapter. … Read more
docker save will indeed produce a tarball, but with all parent layers, and all tags + versions. docker export does also produce a tarball, but without any layer/history. It is often used when one wants to “flatten” an image, as illustrated in “Flatten a Docker container or image” from Thomas Uhrig: docker export <CONTAINER ID> … Read more
In some cases (like in my case) you may be trying to delete an image by specifying the image id that has multiple tags that you don’t realize exist, some of which may be used by other images. In which case, you may not want to remove the image. If you have a case of … Read more
You can, with the multi-stage builds feature introduced in Docker 1.17 Take a look at this: FROM golang:1.7.3 WORKDIR /go/src/github.com/alexellis/href-counter/ RUN go get -d -v golang.org/x/net/html COPY app.go . RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app . FROM alpine:latest RUN apk –no-cache add ca-certificates WORKDIR /root/ COPY –from=0 /go/src/github.com/alexellis/href-counter/app . CMD [“./app”] … Read more
Redis runs in a seperate container which has seperate virtual ethernet adapter and IP address to the container your node application is running in. You need to link the two containers or create a user defined network for them docker network create redis docker run -d –net “redis” –name redis redis docker run -d -p … Read more
To run multiple commands in docker, use /bin/bash -c and semicolon ; docker run image_name /bin/bash -c “cd /path/to/somewhere; python a.py” In case we need command2 (python) will be executed if and only if command1 (cd) returned zero (no error) exit status, use && instead of ; docker run image_name /bin/bash -c “cd /path/to/somewhere && … Read more
If you are using a Dockerfile, try: ENTRYPOINT [“tail”, “-f”, “/dev/null”] (Obviously this is for dev purposes only, you shouldn’t need to keep a container alive unless it’s running a process eg. nginx…)
An instance of an image is called a container. You have an image, which is a set of layers as you describe. If you start this image, you have a running container of this image. You can have many running containers of the same image. You can see all your images with docker images whereas … Read more