有没有办法在安装某些软件包时禁用 SSL 验证?
我找到了如何将我的证书添加到受信任的证书中,但我宁愿禁用此检查。
我需要它来避免以下错误:
SSL routines:tls_process_server_certificate:certificate verify failed
Run Code Online (Sandbox Code Playgroud) 我正在尝试将我的基本 docker 映像从 centos 7 转换到 alpine,但是在尝试安装 pip 包时收到 gcc 错误。
这是收到的错误的片段:
Successfully built backports.ssl-match-hostname configobj dpkt iniparse IPy kitchen logmatic-python maxminddb NeuroTools procfs pycparser python-json-logger pyudev repoze.lru scandir scapy
Failed to build guppy kiwisolver numpy psutil pygpgme pyliblzma python-ldap pyxattr subprocess32
Installing collected packages: atomicwrites, attrs, backports.functools-lru-cache, backports.ssl-match-hostname, certifi, chardet, six, configobj, configparser, contextlib2, cycler, decorator, dnspython, dpkt, urllib3, elasticsearch, elasticsearch5, elasticsearch6, funcsigs, ipaddress, maxminddb, idna, requests, geoip2, guppy, scandir, pathlib2, more-itertools, zipp, importlib-metadata, iniparse, IPy, kafka, kafka-python, kitchen, …Run Code Online (Sandbox Code Playgroud) 我一直在阅读 的man页面apk add,但我不完全理解如何使用该--force-broken-world标志。
我试图将 Python 2.7.6 安装到 Alpine 映像中,但出现以下错误。
$ docker run --rm -it alpine:latest apk add --no-cache python=2.7.6
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz
ERROR: unsatisfiable constraints:
python2-2.7.14-r2:
breaks: world[python=2.7.6]
Run Code Online (Sandbox Code Playgroud)
但是,我可以强制安装它,但我不确定它在做什么(如果有的话)。
$ docker run --rm -it alpine:latest apk add --force-broken-world --no-cache python=2.7.6
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz
OK: 4 MiB in 11 packages
Run Code Online (Sandbox Code Playgroud)
从命令行来看,一切看起来都很好。但是,当您在容器内执行此操作时,python似乎并未安装。
$ docker run --rm -it alpine:latest /bin/ash
# apk add --force-broken-world --no-cache python=2.7.6
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz
OK: 4 MiB …Run Code Online (Sandbox Code Playgroud) 我基于 alpine Linex 的 docker 镜像无法从网络获取任何内容。所以命令“apk add xxx”是有效的。现在我的想法是下载 .apk 文件并将其复制到 docker 容器中。但如何安装 .apk 文件?
我想减少我的 docker 镜像并切换到 alpine 基础镜像。这会导致 bash 找不到 apt 的问题。事实证明,我必须改用 apk。但是,它似乎没有找到我需要的 java 版本。这是我的 dockerfile
#Use alpine golang
FROM golang:alpine
#Get the code from local code commit repo
WORKDIR /go/src/xxx
COPY . /go/src/xxx
#Install Java and cleanup after in the same layer
RUN apk update && apk add openjdk-8-jre-headless && rm -rf /var/lib/apt/lists/*
#Install dependencies recursively and remove the third_party directory after it has been used for compiling.
RUN go get ./... && go run setup.go && RUN rm -rf third_party
#More …Run Code Online (Sandbox Code Playgroud) 我想在高山容器中添加terraform版本0.12.21,但我只能0.11.0使用apk. 如果我尝试将其添加为所需版本,则会出现以下错误:
/ # apk upgrade terraform==0.12.21-r0
OK: 192 MiB in 66 packages
/ # apk add terraform==0.12.21-r0
ERROR: unsatisfiable constraints:
terraform-0.11.0-r0:
breaks: world[terraform=0.12.21-r0]
Run Code Online (Sandbox Code Playgroud)
如何修复此 apk 错误?
尝试安装时pdftk apk抛出此错误。
ERROR: unsatisfiable constraints:
pdftk (missing):
required by: world[pdftk]
Run Code Online (Sandbox Code Playgroud)
这是整个输出:
/opt/app # apk add pdftk
fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/community/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/community/x86_64/APKINDEX.tar.gz
ERROR: unsatisfiable constraints:
pdftk (missing):
required by: world[pdftk]
Run Code Online (Sandbox Code Playgroud)
我是 apk 新手,不确定问题的含义或如何解决它。
我正在尝试从https://docs.docker.com/compose/gettingstarted/构建 docker 映像示例。我收到了这个错误
Building web
Step 1/9 : FROM python:3.7-alpine
---> e854017db514
Step 2/9 : WORKDIR /code
---> Using cache
---> e15b6e62d8af
Step 3/9 : ENV FLASK_APP app.py
---> Using cache
---> 759c4bc8b254
Step 4/9 : ENV FLASK_RUN_HOST 0.0.0.0
---> Using cache
---> 6d40793f3089
Step 5/9 : RUN apk add --no-cache gcc musl-dev linux-headers
---> Running in 5e40bd670f1b
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/community/x86_64/APKINDEX.tar.gz
WARNING: Ignoring http://dl-cdn.alpinelinux.org/alpine/v3.11/main/x86_64/APKINDEX.tar.gz: Permission denied
WARNING: Ignoring http://dl-cdn.alpinelinux.org/alpine/v3.11/community/x86_64/APKINDEX.tar.gz: Permission denied
ERROR: unsatisfiable constraints:
gcc (missing):
required by: …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用 alpinelinux 3.12 的联机帮助页,使用最新的 3.12 版本,并且:
# apk add man
ERROR: unsatisfiable constraints:
man (missing):
required by: world[man]
Run Code Online (Sandbox Code Playgroud)
奇怪的?apk 添加手册页效果很好。我已启用所有存储库(社区、边缘等)apk 更新,但仍然找不到人?
alpine-linux ×9
docker ×7
dockerfile ×2
linux ×2
ash ×1
gcc ×1
manpage ×1
offline ×1
ssl ×1
terraform ×1