我无法man在Alpine Linux Docker容器中工作.
拉高山Linux并启动一个容器.
docker pull alpine:latest
docker run -t -i alpine /bin/ash
Run Code Online (Sandbox Code Playgroud)
从所有远程存储库更新存储库索引.
apk update
Run Code Online (Sandbox Code Playgroud)
安装man和man-pages.
apk add man man-pages
Run Code Online (Sandbox Code Playgroud)
安装包及其文档.
apk add curl
apk add curl-doc
Run Code Online (Sandbox Code Playgroud)
尝试查看手册页.
/ # man curl
/usr/share/man/mandoc.db: No such file or directory
man: outdated mandoc.db lacks curl(1) entry,
consider running # makewhatis /usr/share/man
more: -s: No such file or directory
/ #
Run Code Online (Sandbox Code Playgroud)
什么?
更新
按照@EugenMayer的建议添加mdicml-apropos,我可以开始curl --manual工作但不是man curl.不幸的是,gnupg --manual根本不起作用.此行为不一致且意外.
我正在尝试在CI服务器上的docker容器内构建一个Android应用程序,而aapt2无法合并资源.
Base Docker Image是 openjdk:8-alpine
从高山存储库安装在我的图像中的软件包是:
build-base alpine-sdk bash ca-certificates curl gcc git gzip musl-dev openssh-client python python-dev tar unzip wget
Run Code Online (Sandbox Code Playgroud)
此外,我正在下载并安装Glibc
https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.25-r0/glibc-2.25-r0.apk
Run Code Online (Sandbox Code Playgroud)
已安装的android sdk包是
build-tools;26.0.0-rc2 platforms;android-25 platform-tools extras;android;m2repository extras;google;m2repository extras;google;google_play_services
Run Code Online (Sandbox Code Playgroud)
该应用程序目前正在使用 Gradle Wrapper 4.0-rc-1
错误是:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:mergeDebugResources'.
> Error: java.lang.ExceptionInInitializerError
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:mergeDebugResources'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:100)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64)
at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:88)
at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
at …Run Code Online (Sandbox Code Playgroud) 我在通过Alpine映像获得PHP-FPM的GD Jpeg支持时遇到问题。我尝试了我能想到的每种组合以使其正常工作。以下是我的Dockerfile中的片段:
FROM php:7.1-fpm-alpine
RUN apk update \
&& apk upgrade \
&& apk add --no-cache \
freetype \
libpng \
libjpeg-turbo \
freetype-dev \
libpng-dev \
jpeg-dev \
libjpeg \
libjpeg-turbo-dev \
RUN docker-php-ext-configure gd \
--with-freetype-dir=/usr/lib/ \
--with-png-dir=/usr/lib/ \
--with-jpeg-dir=/usr/lib/ \
--with-gd
RUN NUMPROC=$(grep -c ^processor /proc/cpuinfo 2>/dev/null || 1) \
&& docker-php-ext-install -j${NUMPROC} gd
Run Code Online (Sandbox Code Playgroud)
当我将其装入容器并运行时php -r 'print_r(gd_info());',得到以下信息:
Array
(
[GD Version] => bundled (2.1.0 compatible)
[FreeType Support] =>
[GIF Read Support] => 1
[GIF Create …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:3.7构建图像。
我遇到两个问题:
我收到的错误是:
找不到满足设置工具要求的版本(来自版本:)找不到与安装工具匹配的发行版
注意:所有软件包都使用pip下载预先缓存在目录中。
dockerfile如下所示:
RUN apk add --no-cache --virtual .build-deps <dev packages>
&& apk add --no-cache --update python3
&& pip3 install --upgrade pip setuptools
RUN pip3 install -f ./python-packages --no-index -r requirements.txt ./python-packages/pkgs
....
Run Code Online (Sandbox Code Playgroud)
dev包,例如libffi-dev,libressl-dev等。
代码很简单:
import locale
locale.setlocale(locale.LC_ALL, 'de_DE.UTF-8') # I tried de_DE and de_DE.utf8 too
locale.currency(0)
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/usr/local/lib/python3.7/locale.py", line 267, in currency
raise ValueError("Currency formatting is not possible using "
ValueError: Currency formatting is not possible using the 'C' locale.
Run Code Online (Sandbox Code Playgroud)
当我在 ubuntu 上运行它时它有效。然而,在高山上,会弹出此错误。我尝试了此评论中的解决方法,但没有成功。我还添加/usr/glibc-compat/bin到PATH该脚本之上,但没有帮助。
有什么办法可以让语言环境在高山上工作吗?
自己尝试一下:
docker run --rm alpine sh -c "apk add python3; python3 -c 'import locale; locale.setlocale(locale.LC_ALL, \"de_DE.UTF-8\"); locale.currency(0)'"
Run Code Online (Sandbox Code Playgroud)
更新:这个仓库也不起作用。
更新:我也尝试过这个 …
我基于 alpine Linex 的 docker 镜像无法从网络获取任何内容。所以命令“apk add xxx”是有效的。现在我的想法是下载 .apk 文件并将其复制到 docker 容器中。但如何安装 .apk 文件?
我想在运行 Alpine Linux 的 Docker 容器上安装 Flutter。
我写了以下内容Dockerfile:
FROM alpine
RUN apk add bash curl file git zip
RUN git clone https://github.com/flutter/flutter.git
ENV PATH="$PATH:/flutter/bin"
RUN flutter channel stable
Run Code Online (Sandbox Code Playgroud)
一切都很顺利,直到最后一步,我得到:
Step 5/5 : RUN flutter channel stable
---> Running in f8e764b1e091
Downloading Dart SDK from Flutter engine 82b4ae86d69b4bad10a42ad380f2a538d97ffb38...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 174M 100 174M 0 0 23.1M 0 0:00:07 0:00:07 --:--:-- 23.8M
Building …Run Code Online (Sandbox Code Playgroud) 当我想构建 Alpine Docker 时,在定义特定的 python 版本时出现错误。
我的 Dockerfile:
FROM python:3-alpine
RUN apk --no-cache add build-base openldap-dev python2-dev 'python3=3.6.9-r3' 'python3-dev=3.6.9-r3'
RUN pip3 install python-ldap sqlalchemy requests
ADD ucs-root-ca.crt /usr/local/share/ca-certificates/foo.crt
RUN chmod 644 /usr/local/share/ca-certificates/foo.crt && update-ca-certificates
COPY templates ./templates
COPY api.py filedb.py syncer.py ./
VOLUME [ "/db" ]
VOLUME [ "/conf/dovecot" ]
VOLUME [ "/conf/sogo" ]
ENTRYPOINT [ "python3", "syncer.py" ]
Run Code Online (Sandbox Code Playgroud)
当我想构建我的 dockerfile 时出现以下错误:
ERROR: unable to select packages:
python3-3.8.7-r0:
breaks: world[python3=3.6.9-r3]
satisfies: python3-dev-3.8.7-r0[python3=3.8.7-r0]
python3-dev-3.8.7-r0:
breaks: world[python3-dev=3.6.9-r3]
The command '/bin/sh -c apk …Run Code Online (Sandbox Code Playgroud) So I am running into an error with the latest docker build from alpine. alpine:3.14.0 was released about a day ago and was trying to install libressl and libressl-dev and both seem to fail with the error below. My work around at the moment was to build using the alpine:3.12.0 as 3.12.0 seems to not have libretls installed. Although I would like to know how to fix this. I tried to remove libretls but that didn't work (error also below). …
alpine-linux ×10
docker ×10
python ×3
linux ×2
aapt ×1
android ×1
ash ×1
flutter ×1
libressl ×1
locale ×1
manpage ×1
offline ×1
php-gd ×1
python-3.7 ×1
python-3.x ×1