I have registered for Coursera Introduction to Containers w/ Docker, Kubernetes & OpenShift tutorial. And for the final project we need to submit the guestbook Dockerfile. I am following the following solution – link, but the docker build command is failing. I have attached the terminal log herewith.
theia@theiadocker-nirmalyasinh:/home/project$ [ ! -d 'guestbook' ] && git clone -b ver1 https://github.com/ibm-developer-skills-network/guestbook
Cloning into 'guestbook'...
remote: Enumerating objects: 134, done.
remote: Counting objects: 100% (46/46), done.
remote: Compressing objects: 100% (29/29), done.
remote: Total 134 (delta 36), reused 17 (delta 17), pack-reused 88
Receiving objects: 100% (134/134), 62.65 KiB | 12.53 MiB/s, done.
Resolving deltas: 100% (54/54), done.
theia@theiadocker-nirmalyasinh:/home/project$ ls -l
total 4
drwxr-sr-x 5 theia users 4096 Apr 23 09:27 guestbook
theia@theiadocker-nirmalyasinh:/home/project$ cd guestbook
theia@theiadocker-nirmalyasinh:/home/project/guestbook$ cd v1/guestbook
theia@theiadocker-nirmalyasinh:/home/project/guestbook/v1/guestbook$ cat Dockerfile
FROM golang:1.15 as builder
RUN go get github.com/codegangsta/negroni
RUN go get github.com/gorilla/mux github.com/xyproto/simpleredis
COPY main.go .
RUN go build main.go
FROM ubuntu:18.04
COPY --from=builder /go//main /app/guestbook
ADD public/index.html /app/public/index.html
ADD public/script.js /app/public/script.js
ADD public/style.css /app/public/style.css
ADD public/jquery.min.js /app/public/jquery.min.js
WORKDIR /app
CMD ["./guestbook"]
EXPOSE 3000
theia@theiadocker-nirmalyasinh:/home/project/guestbook/v1/guestbook$ export MY_NAMESPACE=sn-labs-$USERNAME
theia@theiadocker-nirmalyasinh:/home/project/guestbook/v1/guestbook$ docker build . -t us.icr.io/$MY_NAMESPACE/guestbook:v1
[+] Building 253.6s (11/19) docker:default
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 500B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/ubuntu:18.04 0.5s
=> [internal] load metadata for docker.io/library/golang:1.15 0.4s
=> [auth] library/ubuntu:pull token for registry-1.docker.io 0.0s
=> [auth] library/golang:pull token for registry-1.docker.io 0.0s
=> [stage-1 1/7] FROM docker.io/library/ubuntu:18.04@sha256:152dc042452c496007f07ca91 6.8s
=> => resolve docker.io/library/ubuntu:18.04@sha256:152dc042452c496007f07ca9127571cb9 0.0s
=> => sha256:152dc042452c496007f07ca9127571cb9c29697f42acbfad72324b2b 1.33kB / 1.33kB 0.0s
=> => sha256:dca176c9663a7ba4c1f0e710986f5a25e672842963d95b960191e2d9f718 424B / 424B 0.0s
=> => sha256:f9a80a55f492e823bf5d51f1bd5f87ea3eed1cb31788686aa99a2fb6 2.30kB / 2.30kB 0.0s
=> => sha256:7c457f213c7634afb95a0fb2410a74b7b5bc0ba527033362c240c7 25.69MB / 25.69MB 3.3s
=> => extracting sha256:7c457f213c7634afb95a0fb2410a74b7b5bc0ba527033362c240c7a11bef4 3.3s
=> [builder 1/5] FROM docker.io/library/golang:1.15@sha256:ea080cc817b02a946461d42c0 52.1s
=> => resolve docker.io/library/golang:1.15@sha256:ea080cc817b02a946461d42c02891bf750 0.0s
=> => sha256:ea080cc817b02a946461d42c02891bf750e3916c52f7ea8187bccde8 2.36kB / 2.36kB 0.0s
=> => sha256:eb7ebf06372b4930e0b9539b3510422c4860ec3361bb2f22b63a8579 1.79kB / 1.79kB 0.0s
=> => sha256:c040670e5e559fd936db175530ad4c1dd014bd25b2bf25ea19fa2055 7.83MB / 7.83MB 2.1s
=> => sha256:40349a2425efb3650843103390e2ace030c4288c96f3619cafb16320 7.00kB / 7.00kB 0.0s
=> => sha256:627b765e08d177e63c9a202ca4991b711448905b934435c70b7cbd 50.44MB / 50.44MB 7.8s
=> => sha256:073a180f4992853fa3dd8da604e7b041bc8ea92157749d042c0853 10.00MB / 10.00MB 4.3s
=> => sha256:bf76209566d0c8d78df205b09e6e5b52ff7f10cb4e1c03d9336ed 51.84MB / 51.84MB 21.7s
=> => sha256:6182a456504bb119011b721ede5d1e6cf4d0621447465d80cc1d4 68.75MB / 68.75MB 17.7s
=> => sha256:73e3d3d88c3c574f686b011dcd0f559f099f6b0e755a45d2759 121.11MB / 121.11MB 23.3s
=> => extracting sha256:627b765e08d177e63c9a202ca4991b711448905b934435c70b7cbd7d4a9c7 6.4s
=> => extracting sha256:c040670e5e559fd936db175530ad4c1dd014bd25b2bf25ea19fa20554fe2d 0.9s
=> => sha256:5946d17734ce7686f86222b2d0d804ee5cb06cdb23ee6b0562791852893 155B / 155B 22.1s
=> => extracting sha256:073a180f4992853fa3dd8da604e7b041bc8ea92157749d042c0853312f178 0.3s
=> => extracting sha256:bf76209566d0c8d78df205b09e6e5b52ff7f10cb4e1c03d9336ed7dd2decd 3.3s
=> => extracting sha256:6182a456504bb119011b721ede5d1e6cf4d0621447465d80cc1d4e53c0ef9 2.9s
=> => extracting sha256:73e3d3d88c3c574f686b011dcd0f559f099f6b0e755a45d2759f3934bad1b 6.2s
=> => extracting sha256:5946d17734ce7686f86222b2d0d804ee5cb06cdb23ee6b056279185289336 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 92.38kB 0.0s
=> [builder 2/5] RUN go get github.com/codegangsta/negroni 2.4s
=> ERROR [builder 3/5] RUN go get github.com/gorilla/mux github.com/xyproto/simpler 198.4s
------
> [builder 3/5] RUN go get github.com/gorilla/mux github.com/xyproto/simpleredis:
198.2 package github.com/xyproto/simpleredis: no Go files in /go/src/github.com/xyproto/simpleredis
------
ERROR: failed to solve: executor failed running [/bin/sh -c go get github.com/gorilla/mux github.com/xyproto/simpleredis]: exit code: 1
I have followed many troubleshooting guides like, this and this. But the same problem is still persisting. I am not able to resolve this error –
no Go files in /go/src/github.com/xyproto/simpleredis
Can you please guide me properly? And by the way, the commands are being executed in IBM online lab, not in my local machine.
Thanks a lot.