Answers for "docker copy from another image"

2

copy docker image from one machine to another

docker save -o <path for generated tar file> <image name>
Posted by: Guest on March-17-2020
5

docker copy from another image

FROM golang:1.7.3 AS builder
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=builder /go/src/github.com/alexellis/href-counter/app .
CMD ["./app"]
Posted by: Guest on September-02-2020
2

copy docker image from one machine to another

docker load -i <path to image tar file>
Posted by: Guest on March-17-2020

Code answers related to "docker copy from another image"

Browse Popular Code Answers by Language