标签: alpine-linux

Docker alpine:尽管在 Dockerfile 中使用 apk 安装了 ffmpeg,但未找到 ffprobe

ffmpeg我有一个可以执行和命令的 Go 程序ffprobe,因此我需要将它们安装在我的 Docker 容器中。

这是我的 Dockerfile:

FROM golang:1.17.7-alpine

WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN go build -o ./server cmd/service/main.go

RUN apk update
RUN apk upgrade
RUN apk add --no-cache ffmpeg

FROM alpine
COPY --from=0 /src/server /usr/bin/server
CMD ["server"]
Run Code Online (Sandbox Code Playgroud)

但是,当我运行容器时,它说:

exec: "ffprobe": executable file not found in $PATH
Run Code Online (Sandbox Code Playgroud)

我该如何修复它?

ffmpeg docker alpine-linux

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

列出密钥时 Gpg 挂起(docker 安装)

我尝试设置一个 docker 映像来压缩和加密文件。

我的问题是,当我尝试使用 Dockerfile 执行此操作时,gpg --list-keysshell 挂起并且没有任何反应。

没有错误消息。我在日志中看不到任何内容。

我的 Dockerfile :

FROM alpine:3
COPY public.asc /
RUN apk add --no-cache gnupg openssh && ssh-keygen -A && mkdir /root/.ssh
ENTRYPOINT ["/entrypoint.sh"]
EXPOSE 22/tcp
COPY entrypoint.sh /
RUN gpg --import /public.asc
Run Code Online (Sandbox Code Playgroud)

如果我删除RUN gpg --import /public.asc并将其直接运行到附加到容器的 shell 中,然后运行gpg --list-keys​​,它工作正常并返回密钥。

也许我遗漏了 Docker 如何构建镜像的一些内容?

gnupg dockerfile alpine-linux

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

alpine linux lighttpd安装缺少包

我正在http://wiki.alpinelinux.org/wiki/Setting_Up_Lighttpd_With_FastCGI上关注Alpine linux上的文件,但我在复制第一个命令时遇到问题:

apk add lighttpd php-common php-iconv php-json php-gd php-curl php-xml php-pgsql php-imap php-cgi fcgi
Run Code Online (Sandbox Code Playgroud)

我收到以下错误:

ERROR: unsatisfiable constraints:
  lighttpd (missing):
    required by: world[lighttpd]
  php-cgi (missing):
    required by: world[php-cgi]
  php-common (missing):
    required by: world[php-common]
  php-curl (missing):
    required by: world[php-curl]
  php-gd (missing):
    required by: world[php-gd]
  php-iconv (missing):
    required by: world[php-iconv]
  php-imap (missing):
    required by: world[php-imap]
  php-json (missing):
    required by: world[php-json]
  php-pgsql (missing):
    required by: world[php-pgsql]
  php-xml (missing):
    required by: world[php-xml]
scw-f9c40f:~# apk add lighttpd
Run Code Online (Sandbox Code Playgroud)

有任何想法吗?

linux lighttpd alpine-linux

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

java.net.InetAddress java类不解析Alpine Docker容器上的IP

当我在Alpine Linux上运行Java JDK 8的容器Docker中运行此代码时

import java.io.*;
import java.util.*;
import java.net.*;

public class SomaDBTest {
  public static void main(String... args) throws Throwable {

    InetAddress ip = InetAddress.getByName("mysql");    
    System.out.println("Begin -  mysql IP Addr = " + ip.getHostAddress());
    . . . 
  }
}
Run Code Online (Sandbox Code Playgroud)

我收到错误:

  Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
  Exception in thread "main" java.net.UnknownHostException: mysql: unknown error
    at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
    at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928)
    at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323)
    at java.net.InetAddress.getAllByName0(InetAddress.java:1276)
    at java.net.InetAddress.getAllByName(InetAddress.java:1192)
    at java.net.InetAddress.getAllByName(InetAddress.java:1126)
    at java.net.InetAddress.getByName(InetAddress.java:1076)
    at SomaDBTest.main(SomaDBTest.java:52)
Run Code Online (Sandbox Code Playgroud)

有任何想法吗 ?

顺便说一句,我可以成功运行ping mysql 和 …

java mysql linux docker alpine-linux

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

如何将 dos2unix 添加到基于 Alpine 的 docker 容器?

我有以下 dockerfile:

FROM haproxy:alpine

RUN apk --update add bash && apk --no-cache add dos2unix rsyslog supervisor wget curl ruby which py-setuptools py-pip && pip install awscli && chmod +x /*.sh

COPY *haproxy.cfg /etc/
COPY supervisord.ini /etc/
COPY rsyslog.conf /etc/

COPY entrypoint.sh /
RUN dos2unix /entrypoint.sh && apt-get --purge remove -y dos2unix

ENTRYPOINT ["/entrypoint.sh"]

EXPOSE 9999

CMD ["/usr/bin/supervisord", "-c", "/etc/supervisord.ini"]
Run Code Online (Sandbox Code Playgroud)

但是,当我构建它时,我得到:

fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/community/x86_64/APKINDEX.tar.gz
ERROR: unsatisfiable constraints:
  dos2unix (missing):
    required by: world[dos2unix]
Run Code Online (Sandbox Code Playgroud)

我可以看到这里存在这个包:https : //pkgs.alpinelinux.org/packages?name=dos2unix&branch=&repo=&arch=&maintainer=

我究竟做错了什么?

docker dockerfile alpine-linux

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

执行shell命令不会产生任何结果

我在我的Perl脚本中运行shell命令,但它没有按预期工作.我是一个以Alpine Linux为基础的容器.

我的Perl版本v5.24.0.

perl -e 'my $TEST = `ls -al`; print $TEST'
Run Code Online (Sandbox Code Playgroud)

这没什么打印,但适用于我在Red Hat Linux上使用Perl v5.6.1的另一个系统.

perl busybox docker alpine-linux

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

高山linux:readelf(missing)。如何在Alpine Linux上安装readelf?

当我尝试readelf在Apline3.5 上安装软件包时,收到此错误消息。

$ apk add --no-cache readelf
client readelf
fetch http://dl-    cdn.alpinelinux.org/alpine/v3.5/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/community/x86_64/APKINDEX.tar.gz
ERROR: unsatisfiable constraints:
  readelf (missing):
    required by: world[readelf]
Run Code Online (Sandbox Code Playgroud)

我只想用一些命令解决这个问题。
这是因为,我希望能够使用Dockerfile做到这一点。我该怎么办??

linux docker alpine-linux

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

在Alpine Docker中获取ssh-keygen

对于节点红色的新功能项目-可以与git repo同步的项目,我需要ssh-keygen在Alpine docker Image中。根据v3.6的Alpine Linux软件包,它位于openssh-keygen软件包中。
因此,我在Dockerfile中添加了如下的RUN命令,但是没有运气。

......
RUN   apk update && \
      apk add --no-cache \
      openssh-keygen
......
Run Code Online (Sandbox Code Playgroud)

然后,通过从Image创建一个容器docker exec -it containername sh,然后执行a 然后键入ssh-keygen- 进行测试,以查看它是否进入Image中,但找不到它。
如果我在Dockerfile中的RUN命令下替换为openssh-keygen,也无法正常工作openssh

有人可以指出正确的方向吗?

node-red dockerfile alpine-linux

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

Docker Alpine错误:可能未定义的宏:AC_PROG_LIBTOOL

我正在尝试创建一个自定义图像以使用Alpine作为基础图像来构建基于React的项目。

FROM python:3.6-alpine3.6

ENV NODE_VERSION 8.11.4

RUN addgroup -g 1000 node \
    && adduser -u 1000 -G node -s /bin/sh -D node \
    && apk add --no-cache \
        libstdc++ \
    && apk add --no-cache --virtual .build-deps \
        binutils-gold \
        curl \
        g++ \
        gcc \
        autoconf \
        automake \
        gnupg \
        libtool \    # Was added later based on suggestions I saw online
        #libltdl-dev \
        libgcc \
        libc-dev \
        libpng-dev \
        linux-headers \
        make \
        python \
  # gpg keys …
Run Code Online (Sandbox Code Playgroud)

autoconf compilation libtool docker alpine-linux

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

在高山上安装MongoDB时出现问题

RUN echo 'http://dl-cdn.alpinelinux.org/alpine/v3.6/community' >> /etc/apk/repositories
RUN apk update
RUN apk add mongodb==3.4.4-r0

RUN mongo --version
Run Code Online (Sandbox Code Playgroud)

它显示错误

ERROR: unsatisfiable constraints:
  so:libboost_chrono-mt.so.1.62.0 (missing):
    required by:
                 mongodb-3.4.4-r0[so:libboost_chrono-mt.so.1.62.0]
  so:libboost_filesystem-mt.so.1.62.0 (missing):
    required by:
                 mongodb-3.4.4-r0[so:libboost_filesystem-mt.so.1.62.0]
  so:libboost_iostreams-mt.so.1.62.0 (missing):
    required by:
                 mongodb-3.4.4-r0[so:libboost_iostreams-mt.so.1.62.0]
  so:libboost_program_options-mt.so.1.62.0 (missing):
    required by:
                 mongodb-3.4.4-r0[so:libboost_program_options-mt.so.1.62.0]
  so:libboost_regex-mt.so.1.62.0 (missing):
    required by:
                 mongodb-3.4.4-r0[so:libboost_regex-mt.so.1.62.0]
  so:libboost_system-mt.so.1.62.0 (missing):
    required by:
                 mongodb-3.4.4-r0[so:libboost_system-mt.so.1.62.0]
  so:libboost_thread-mt.so.1.62.0 (missing):
    required by:
                 mongodb-3.4.4-r0[so:libboost_thread-mt.so.1.62.0]
  so:libcrypto.so.41 (missing):
    required by:
                 mongodb-3.4.4-r0[so:libcrypto.so.41]
  so:libssl.so.43 (missing):
Run Code Online (Sandbox Code Playgroud)

docker alpine-linux

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