N..*_*N.. 3 linux docker dockerfile
Dockerfile1
FROM ubuntu:latest
MAINTAINER ME
RUN apt-get update
RUN apt-get update && apt-get install -y net-tools \
&& apt-get install inetutils-traceroute \
&& apt-get install iputils-ping \
&& apt-get install xinetd telnetd
Run Code Online (Sandbox Code Playgroud)
Dockerfile2
FROM ubuntu:latest
MAINTAINER ME
RUN apt-get update
RUN apt-get update && apt-get install -y net-tools
RUN apt-get update && apt-get install inetutils-traceroute
RUN apt-get update apt-get install iputils-ping
RUN apt-get install xinetd telnetd
Run Code Online (Sandbox Code Playgroud)
Dockerfile3
FROM ubuntu:latest
MAINTAINER ME
RUN apt-get update
RUN apt-get install inetutils-traceroute
RUN apt-get install -y net-tools
RUN apt-get update apt-get install iputils-ping
RUN apt-get install xinetd telnetd
Run Code Online (Sandbox Code Playgroud)
我尝试了 dockerfile 的所有上述风格,但每次都会遇到相同的错误:
The command '/bin/sh -c apt-get update && apt-get install -y net-tools && apt-get install inetutils-traceroute && apt-get install iputils-ping && apt-get install xinetd telnetd' returned a non-zero code: 1
Run Code Online (Sandbox Code Playgroud)
有人发布了答案并在我接受之前将其删除。但这里是——
FROM ubuntu:latest
MAINTAINER ME
RUN apt-get update && apt-get install -y \
net-tools inetutils-traceroute \
iputils-ping xinetd telnetd
Run Code Online (Sandbox Code Playgroud)
这有效!
| 归档时间: |
|
| 查看次数: |
27152 次 |
| 最近记录: |