标签: alpine-linux

用于Alpine Linux的“ --update add”命令的说明

我想了解Dockerfile https://hub.docker.com/r/rdsubhas/tor-privoxy-alpine/~/dockerfile/,其中包含一个RUN执行官

apk --update add privoxy tor@testing runit@testing
Run Code Online (Sandbox Code Playgroud)

我想检查一下我对apk命令用法的理解,因此我尝试如下在Alpine环境中打开终端:

docker run -it --rm alpine:latest /bin/ash
Run Code Online (Sandbox Code Playgroud)

之后,我只是跑去apk看看它的用法:

/ # apk
apk-tools 2.6.8, compiled for x86_64.

usage: apk COMMAND [-h|--help] [-p|--root DIR] [-X|--repository REPO]
           [-q|--quiet] [-v|--verbose] [-i|--interactive] [-V|--version]
           [-f|--force] [-U|--update-cache] [--progress] [--progress-fd FD]
           [--no-progress] [--purge] [--allow-untrusted] [--wait TIME]
           [--keys-dir KEYSDIR] [--repositories-file REPOFILE] [--no-network]
           [--no-cache] [--arch ARCH] [--print-arch] [ARGS]...

The following commands are available:
  add       Add PACKAGEs to 'world' and install (or upgrade) them, while
            ensuring …
Run Code Online (Sandbox Code Playgroud)

linux docker alpine-linux

8
推荐指数
2
解决办法
4362
查看次数

在Docker容器中进行apk更新期间文件描述符描述符错误...为什么?

运行后:

docker network rm $NETNAME
docker network create --driver bridge $NETNAME --subnet "${SUBNET}0/24"
docker run --name $NODENAME -it --net $NETNAME --ip 192.168.0.2 --volume --detach $IMGNAME
Run Code Online (Sandbox Code Playgroud)

在容器中,以root身份运行apk udpdate

# apk update
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz
ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.7/main: Bad file descriptor
WARNING: Ignoring APKINDEX.70c88391.tar.gz: Bad file descriptor
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz
ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.7/community: Bad file descriptor
WARNING: Ignoring APKINDEX.5022a8a2.tar.gz: Bad file descriptor
2 errors; 33 distinct packages available
Run Code Online (Sandbox Code Playgroud)

...并击中Bad file descriptor错误。

还有许多其他人遇到相同的错误:

CDN似乎已关闭,无法使镜像工作#280

仓库问题?#279

有关如何解决此问题的建议,范围如下:

“这是一个DNS查找错误。只需将google DNS服务器(8.8.8.8、8.8.4.4)添加到Docker主机的守护进程配置文件中即可。”

... 至 ...

“将以下内容添加到您的Dockerfile:”

RUN …

linux docker dockerfile devops alpine-linux

8
推荐指数
1
解决办法
2000
查看次数

Docker Alpine Samba无法启动

我建造了一个高山,s6和桑巴的码头集装箱.一切看起来都不错,但是当它开始smbd时它会在没有任何日志文件的情况下崩溃.

added interface eth0 ip=172.17.0.6 bcast=172.17.255.255       
netmask=255.255.0.0
loaded services    
Netbios name list:-
my_netbios_names[0]="ADD372A5C9D7"
INFO: Profiling support unavailable in this build.
Standard input is not a socket, assuming -D option
Becoming a daemon.
exit_daemon: STATUS=daemon failed to start: Failed to create session, error code 1
Run Code Online (Sandbox Code Playgroud)

s6运行服务:

#!/usr/bin/execlineb -P
smbd --foreground --log-stdout
Run Code Online (Sandbox Code Playgroud)

Dockerfile:

FROM alpine:edge

# env variables
ENV S6_VERSION v1.21.2.1

# install s6-overlay
ADD https://github.com/just-containers/s6-overlay/releases/download/${S6_VERSION}/s6-overlay-amd64.tar.gz /tmp/
RUN tar xzf /tmp/s6-overlay-amd64.tar.gz -C /

RUN apk add --no-cache \
    bash shadow \
    samba-common-tools …
Run Code Online (Sandbox Code Playgroud)

samba docker alpine-linux

8
推荐指数
2
解决办法
2156
查看次数

在Alpine Docker容器中运行OpenSSH

我已经安装了OpenSSH,现在我希望按照文档中的描述运行它/etc/init.d/sshd start.但是它没有开始:

 / # /etc/init.d/sshd start
 /bin/ash: /etc/init.d/sshd: not found
Run Code Online (Sandbox Code Playgroud)

思考?

PS

/ # ls -la /etc/init.d/sshd 
-rwxr-xr-x    1 root     root          2622 Jan 14 20:48 /etc/init.d/sshd
Run Code Online (Sandbox Code Playgroud)

/etc/init.d/sshd的内容:

    #!/sbin/openrc-run
    # Copyright 1999-2015 Gentoo Foundation
    # Distributed under the terms of the GNU General Public License v2
    # $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/files/sshd.rc6.4,v 1.5 2015/05/04 02:56:25 vapier Exp $

    description="OpenBSD Secure Shell server"
    description_checkconfig="Verify configuration file"
    description_reload="Reload configuration"

    extra_commands="checkconfig"
    extra_started_commands="reload"

    : ${SSHD_CONFDIR:=/etc/ssh}
    : ${SSHD_CONFIG:=${SSHD_CONFDIR}/sshd_config}
    : ${SSHD_PIDFILE:=/var/run/${SVCNAME}.pid}
    : ${SSHD_BINARY:=/usr/sbin/sshd}

    depend() …
Run Code Online (Sandbox Code Playgroud)

linux shell openssh docker alpine-linux

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

node-serialport在alpine linux上失败了

我正在使用node-serialport https://github.com/voodootikigod/node-serialport的小nodejs(nodejs v4.3)项目.我把它包裹在码头图像中.首先,我成功使用debian作为基本图像,但它的总大小约为600MB.然后我切换到alpine linux https://hub.docker.com/_/alpine/并实现了100MB的图像大小.但是,nodejs项目停止使用alpine作为基本图像.这是一些日志:

安装node-serialport日志:

> serialport@2.0.6 install /app/node_modules/serialport
> node-pre-gyp install --fallback-to-build

[serialport] Success: "/app/node_modules/serialport/build/Release/node-v46-linux-x64/serialport.node" is installed via remote
serialport@2.0.6 node_modules/serialport
??? bindings@1.2.1
??? async@0.9.0
??? sf@0.1.7
??? debug@2.2.0 (ms@0.7.1)
??? nan@2.0.9
??? optimist@0.6.1 (wordwrap@0.0.3, minimist@0.0.10)
Run Code Online (Sandbox Code Playgroud)

当我尝试打开串口时出现错误:

npm ERR! Linux 3.19.0-30-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "start"
npm ERR! node v4.3.0
npm ERR! npm  v2.14.12
npm ERR! code ELIFECYCLE
npm ERR! app@1.2.0 start: `node ./bin/www`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at …
Run Code Online (Sandbox Code Playgroud)

node.js node-serialport docker alpine-linux

7
推荐指数
1
解决办法
1044
查看次数

警告:无法解析.gnu_debugdata部分; LZMA支持在编译时被禁用

当将核心转储文件加载到gdb中时,我收到以下警告,看起来加载某些符号也因此失败.

warning: Cannot parse .gnu_debugdata section; LZMA support was disabled at compile time
Run Code Online (Sandbox Code Playgroud)

知道如何解决这个问题吗?

c++ gdb core gdbserver alpine-linux

7
推荐指数
1
解决办法
2125
查看次数

Docker Alpine映像+ grpc:警告:使用了不安全的环境读取功能'getenv'

当我使用以下图像时:node:6.11.0-alpine运行我的服务(使用GRPC),然后继续收到以下警告:

D0622 06:52:01.170502843       1 env_linux.c:66]             Warning: insecure environment read function 'getenv' used
D0622 06:52:01.554446816      12 env_linux.c:66]             Warning: insecure environment read function 'getenv' used
D0622 06:52:01.559295167      14 env_linux.c:66]             Warning: insecure environment read function 'getenv' used
D0622 06:52:01.566036292      13 env_linux.c:66]             Warning: insecure environment read function 'getenv' used
D0622 06:52:01.569975088      15 env_linux.c:66]             Warning: insecure environment read function 'getenv' used
Run Code Online (Sandbox Code Playgroud)

我会错过任何包裹吗?如何解决这个问题?

可以参考此问题#8104

getenv docker alpine-linux

7
推荐指数
1
解决办法
877
查看次数

如何在Alpine linux上为nginx添加Lua模块?

我希望在启用了Lua模块的情况下为nginx提供精简的Docker镜像.如何基于Alpine linux创建这个?

lua nginx docker alpine-linux

7
推荐指数
3
解决办法
9606
查看次数

从Alpine Edge安装Firefox

尝试从Alpine Edge信息库安装Firefox时似乎丢失了一些东西

Firefox(版本61.0.1-R0)回购

与安装不同

火狐ESR(版本52.8.1-R0)回购

我按照此处所述执行必要的存储库修改,这会使我的存储库看起来像:

http://dl-cdn.alpinelinux.org/alpine/edge/main
http://dl-cdn.alpinelinux.org/alpine/edge/community
Run Code Online (Sandbox Code Playgroud)

跟进:

apk upgrade --update-cache --available
Run Code Online (Sandbox Code Playgroud)

工作正常,并进行所有必要的拉动。但是,尝试时:

apk add --no-cache firefox
Run Code Online (Sandbox Code Playgroud)

退货

错误:无法满足的约束条件:firefox(缺失):由以下人员要求:world [firefox]

这是我从非边缘存储库中获得的期望。我确定我缺少一些简单明显的东西。有什么建议吗?

firefox alpine-linux

7
推荐指数
1
解决办法
3067
查看次数

即使软件包回购网站上列出了Alpine Linux中缺少的软件包

我正在尝试构建一个使用GDAL和必要的Python挂钩运行Alpine Linux的Docker容器:

FROM python:3.6-alpine

RUN apk update

RUN apk add py-gdal gdal

RUN pip install uwsgi

RUN mkdir /code
WORKDIR /code
COPY requirements.txt .

RUN pip install -r requirements.txt

COPY . .

CMD ["uwsgi", "--ini", "uwsgi.ini"]
Run Code Online (Sandbox Code Playgroud)

如您所见,我正在运行一条apk update语句来更新存储库,然后运行一条apk add语句来安装软件包。这是我收到的输出:

/usr/bin/make -f /Users/some_guy/Workspace/tagging_tracker_backend/Makefile build up
Pulling nginx ... 
Pulling db    ... 
Pulling web   ... 
db uses an image, skipping
Building nginx
Step 1/3 : FROM nginx:1.15
 ---> 7042885a156a
Step 2/3 : RUN rm /etc/nginx/conf.d/default.conf
 ---> Using cache …
Run Code Online (Sandbox Code Playgroud)

python linux gdal docker alpine-linux

7
推荐指数
1
解决办法
1591
查看次数