Home > OS >  On ubantu16 docker failed to create images.
On ubantu16 docker failed to create images.

Time:12-04

I want to create their own image, use this command, don't know where is wrong, please teach
Docker build -t myimage.png: 0.1.

Error message is
Sending the build context to Docker daemon 2.048 kB
1/11 Step: the From ubuntu: 16:04
Invalid reference format
The
reference


I'm dockerfile content
The From ubuntu: 16:04
Maintainer DDD
The run apt - get the update
Run apt - get the install - y nginx
Run the echo \ ndaemon off; ""> The/etc/nginx/nginx. Conf
The run chown -r WWW - data: WWW data/var/lib/nginx
Volume ["/data ", "/etc/nginx/site - enabled", "/var/log/nginx"]
Workdir/etc/nginx
CMD/nginx "
Expose 80
Expose 443

CodePudding user response:

The
refer to the original poster wxf54318 response:
I want to create your own image, use this command, don't know where is wrong, please teach
Docker build -t myimage.png: 0.1.

Error message is
Sending the build context to Docker daemon 2.048 kB
1/11 Step: the From ubuntu: 16:04
Invalid reference format
The
reference


I'm dockerfile content
The From ubuntu: 16:04
Maintainer DDD
The run apt - get the update
Run apt - get the install - y nginx
Run the echo \ ndaemon off; ""> The/etc/nginx/nginx. Conf
The run chown -r WWW - data: WWW data/var/lib/nginx
Volume ["/data ", "/etc/nginx/site - enabled", "/var/log/nginx"]
Workdir/etc/nginx
CMD/nginx "
Expose 80
Expose 443

Should be 16.04 not 16:04
 
The From ubuntu: 16.04
Maintainer DDD
The run apt - get the update
Run apt - get the install - y nginx
Run the echo \ ndaemon off; ""> The/etc/nginx/nginx. Conf
The run chown -r WWW - data: WWW data/var/lib/nginx
Volume ["/data ", "/etc/nginx/site - enabled", "/var/log/nginx"]
Workdir/etc/nginx
CMD/nginx "
Expose 80
Expose 443

CodePudding user response:

Another Dockerfile should be standardized writing, where capital must be capitalized
  • Related