build the first Docker instance Docker-whale problem method
Detailed build step, you can refer to my blog Docker Learning Notes (iii)-Dockerfile Create a local image, in my blog, elaborated the various steps and problems encountered, and finally applied to the method of this article.
Or the reader may refer to the official website steps, but the author in accordance with the official website steps encountered errors, if the reader did not encounter errors can be directly refer to the official website step by step.
The dockerfile of the build given on the website are as follows:
From Docker/whalesay:latest
RUN apt-get-y update && apt-get install-y fortunes
Cmd/usr/games/fortune- A | Cowsay
The above Dockerfile the author does not work, so find a variety of information, and this hash sum mismatch the wrong solution.
The author of this error method summarizes the common solution of the APT Hash sum mismatch error in the summary of this blog, interested readers can see.
By finding the information, one author has concluded that the author has dockerfile the official website to the following:
From Docker/whalesay:latest
# env home/root
env debian_frontend noninteractive
RUN sed-i "s|http:// Archive.ubuntu.com|http://mirrors.163.com|g "/etc/apt/sources.list && rm-rf/var/lib/apt/lists/* && Apt-get-y update && apt-get install-y fortunes
cmd/usr/games/fortune-a | cowsay
Compared with the official website, the author mainly modifies: Add env environment variable, modify apt update source, and clear download cache.
Post Reference link: Solution reference