ubuntu - Dockerfile 的构建问题

标签 ubuntu docker

我正在尝试编写自己的 docker 容器,
我的第一个问题是收集基本的基础设施——但是 docker build 会抛出错误。

这是我的文件:

FROM ubuntu:14.04

RUN apt-get update && RUN apt-get install -y \
    git \
    curl

RUN curl -sL https://deb.nodesource.com/setup_6.x | -E bash - \
    && apt-get update && apt-get install -y nodejs

这是构建时的错误:
et:15 http://archive.ubuntu.com trusty-security/restricted amd64 Packages [20.2 kB]
Get:16 http://archive.ubuntu.com trusty-security/universe amd64 Packages [170 kB]
Get:17 http://archive.ubuntu.com trusty/main Sources [1335 kB]
Get:18 http://archive.ubuntu.com trusty/restricted Sources [5335 B]
Get:19 http://archive.ubuntu.com trusty/universe Sources [7926 kB]
Get:20 http://archive.ubuntu.com trusty/main amd64 Packages [1743 kB]
Get:21 http://archive.ubuntu.com trusty/restricted amd64 Packages [16.0 kB]
Get:22 http://archive.ubuntu.com trusty/universe amd64 Packages [7589 kB]
Fetched 21.8 MB in 23s (918 kB/s)
Reading package lists...
W: GPG error: http://archive.ubuntu.com trusty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 16126D3A3E5C1192
/bin/sh: 1: RUN: not found
The command '/bin/sh -c apt-get update && RUN apt-get install -y     git     curl' returned a non-zero code: 127

稍后当我解决这个问题时,我想克隆我的私有(private) bitbucket 存储库。

谢谢 :)

最佳答案

apt-get install -y ca-certificates

您缺少 https 功能的基本证书。

关于ubuntu - Dockerfile 的构建问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38227806/

相关文章:

linux - Nginx Proxy 下多个位置多个服务器

apache - 为什么在debian和ubuntu中默认安装apache的cgi-bin目录在/usr/lib

ubuntu - 如何在 Ubuntu 上安装 .rpm?

java - 应用程序按预期工作,但是当我使用 Docker 对应用程序进行 conterize 时,它​​无法访问 Cassandra 容器

docker - 将主机中的空文件夹挂载到 Docker 中的非空文件夹

docker - VSTS:在自托管Windows 10代理上使用Docker

bash 将最后的用户输入值永久保存在脚本本身中

ubuntu - 使用 Ubuntu 主机操作系统构建 FreeBSD Docker 镜像

docker - Bitbucket Pipeline - Docker 内存

docker - 如何通过终端或 DockerFile 设置 Docker 容器的 RAM 内存