小编Mat*_*yne的帖子

从 Dockerfile 创建镜像

我正在查看这样的 Dockerfile:

FROM microsoft/aspnetcore:2.0 AS base

# Install the SSHD server
RUN apt-get update \
  && apt-get install -y --no-install-recommends openssh-server \
  && mkdir -p /run/sshd \
  && echo "root:Docker!" | chpasswd
#Copy settings file. See elsewhere to find them. 
COPY sshd_config /etc/ssh/sshd_config
COPY authorized_keys  root/.ssh/authorized_keys

# Install Visual Studio Remote Debugger
RUN apt-get install zip unzip
RUN curl -sSL https://aka.ms/getvsdbgsh | bash /dev/stdin -v latest -l ~/vsdbg
  
EXPOSE 2222
Run Code Online (Sandbox Code Playgroud)

我正在尝试使用此 dockerfile 创建图像。我怎样才能做到这一点?在过去的几个小时里,我读了很多网页,例如这个https://odewahn.github.io/docker-jumpstart/building-images-with-dockerfiles.html,但是它们似乎都过于复杂化了,因为我相信有只需要一个命令。

docker

3
推荐指数
1
解决办法
1万
查看次数

标签 统计

docker ×1