我遇到一种情况,node当在基于Alpine 3.6的Docker容器中的Kubernetes下运行时,版本8崩溃了,但是不在本地。我怀疑某种内存损坏或库不匹配或同样奇怪的事情,因为崩溃是不可复制的,并且我尝试过的任何日志记录都无法在崩溃之前记录问题。我设法生成了一个核心转储,但是现在我找不到任何从核心转储中获取堆栈跟踪的方法。
lldb可用的软件包,因此我无法llnode在其上运行segfault-handler或)node-report也不起作用,因为Alpine 3.6忽略了backtraceAPI。有什么方法可以从Alpine 3.6下由Node.js版本8生成的核心转储中获取堆栈跟踪?
我的目标是让 Alpine 能够执行非 musl 支持的 JRE。这背后的动机是图像大小缩小,我在压缩 JRE 本身方面取得了一定的进展,但我发现的最小图像是 50M 的 ARM64v8/debian:slim-9。这相当不错,但还不够。我没有找到任何支持 musl 的适用于 ARM64 的 JRE(最高 9)。因此可能的方向是
这是我的步骤:
我所有的实验都是在真正的 ARM64 硬件上进行的。
基于以下git项目 https://github.com/owlab-exp/alpine-pkg-glibc-arm64
apk --no-cache 添加 ca 证书
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.23-r3/glibc-2.23-r3.apk
apk 添加 --allow-untrusted glibc-2.23-r3.apk
使用 jlink 工具将包含缩小模块列表的 OpenJRE 10 文件夹复制到 Apline 映像。
不幸的是,当我尝试运行 ./java --version 时,我得到了
/bin/sh: ./java: not found
Run Code Online (Sandbox Code Playgroud)
我看到 glibc apk 已安装,已添加以下文件夹
/usr/glibc-compat/lib
Run Code Online (Sandbox Code Playgroud)
我所缺少的任何想法将不胜感激。
我的操作环境仅为Alpine linux,我需要安装VS Code。VS Code 如何在 Alpine Linux 上运行?
我正在尝试对Vue.js应用程序进行Docker化。我正在使用node:10.15-alpineDocker映像作为基础。映像生成失败,并出现以下错误:
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:484:19)
gyp ERR! stack at PythonFinder.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:406:16)
gyp ERR! stack at F (/usr/local/lib/node_modules/npm/node_modules/which/which.js:68:16)
gyp ERR! stack at E (/usr/local/lib/node_modules/npm/node_modules/which/which.js:80:29)
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/which/which.js:89:16
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/isexe/index.js:42:5
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:154:21)
gyp ERR! System Linux 4.9.125-linuxkit
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp …Run Code Online (Sandbox Code Playgroud) 当我在 OSX 上运行它时,我无法make在 alpine 中工作
make update_tools,但是当我在 alpine 映像中运行它时,我收到以下错误:make:***没有规则来创建目标“update_tools”。停止。这是我的 Dockerfile 现在的样子:
#Download base image Alpine-3.9 Golang 1.12
FROM golang:1.12-alpine3.9
# Set Working Directory is /usr/app
WORKDIR /usr/app
# Install Alpine Dependencies
RUN apk update && apk upgrade && apk add --update alpine-sdk && \
apk add --no-cache bash git openssh make cmake
COPY cosmos-sdk .
WORKDIR /usr/app/cosmos-sdk
RUN git checkout v0.33.0 && \
make update_tools && \
make vendor-deps && \
make install && \
gaiad init …Run Code Online (Sandbox Code Playgroud) 我正在 Docker Alpine 镜像中编写一个简单的网络爬虫。但是,我无法将 HTTPS 请求发送到仅支持 TLS1.0 的服务器。如何配置 Alpine linux 以允许过时的 TLS 版本?
我尝试添加MinProtocol但/etc/ssl/openssl.cnf没有运气。
Dockerfile 示例:
FROM node:12.0-alpine
RUN printf "[system_default_sect]\nMinProtocol = TLSv1.0\nCipherString = DEFAULT@SECLEVEL=1" >> /etc/ssl/openssl.cnf
CMD ["/usr/bin/wget", "https://www.restauracesalanda.cz/"]
Run Code Online (Sandbox Code Playgroud)
当我构建并运行这个容器时,我得到
Connecting to www.restauracesalanda.cz (93.185.102.124:443)
ssl_client: www.restauracesalanda.cz: handshake failed: error:1425F102:SSL routines:ssl_choose_client_version:unsupported protocol
wget: error getting response: Connection reset by peer
Run Code Online (Sandbox Code Playgroud) 在 Docker 中,我尝试运行 pip install ortools 但找不到。其他 pip 安装包可以完美运行。我在 Dockerfile 中使用“FROM python:3.6.8-alpine”
bash-4.4# pip install ortools
Collecting ortools
ERROR: Could not find a version that satisfies the requirement ortools (from versions: none)
ERROR: No matching distribution found for ortools
bash-4.4# pip install --upgrade pip
Requirement already up-to-date: pip in /usr/local/lib/python3.6/site-packages (19.1.1)
Run Code Online (Sandbox Code Playgroud)
根本原因: Gooogle OR 工具不支持 alpine,因为 alpine 不支持 pypi
这是基于https://testdriven.io/courses/microservices-with-docker-flask-and-react/
\n\n我正在运行一个指向entrypoint.sh 的docker 文件。
\n\n成功docker-compose-f docker-compose-dev.yml build run\n但正在运行docker-compose-f docker-compose-dev.yml up显示
ERROR: for users Cannot start service users: OCI runtime create failed: container_linux.go:345: starting container process caused "exec: \\"/usr/src/app/entrypoint.sh\\": permission denied": unknown\nERROR: Encountered errors while bringing up the project.\nRun Code Online (Sandbox Code Playgroud)\n\n我确实尝试使用docker run -it \xe2\x80\x93tty users_app:latest sh.\nRunning在交互模式下运行./entrypoint.sh运行确实有效。\n但它不适用于 docker-compose。
有人有同样的问题吗?
\n\n这是我的 docker-compose-dev.yml、Dockerfile-dev 和 entrypoint.sh
\n\ndocker-compose-dev.yml
\n\nversion: \'3.6\'\n\nservices:\n users:\n build:\n context: ./services/users\n dockerfile: Dockerfile-dev\n volumes:\n - \'./services/users:/usr/src/app\'\n ports:\n …Run Code Online (Sandbox Code Playgroud) 我正在尝试覆盖基于 alpine 的 pod 的 dnsconfig(特别是搜索域)。
但dnsconfig似乎在 pod 对象中可用。
无论如何,是否可以在部署对象中提供 dnsconfig 或任何其他解决方法来覆盖该特定 pod 的 searchdomain。
在Lubuntu上,我可以先安装Tor然后再连接到其袜子代理来使用tor,但是在带alpine的docker上,似乎并不那么容易。由于我按原样离开了/ etc / tor / torrc,所以它仅由注释掉的行组成。因此,对于高山用户,我只使用了torrc.sample仅包含注释掉的行的文件。
这是我的Dockerfile:
FROM alpine:latest
RUN apk update && apk upgrade && apk add tor curl && rm /var/cache/apk/* && cp /etc/tor/torrc.sample /etc/tor/torrc
EXPOSE 9050
USER tor
CMD /usr/bin/tor -f /etc/tor/torrc
Run Code Online (Sandbox Code Playgroud)
然后我就跑了:
$ sudo docker build -t tor .
$ sudo docker run --name tor -p 9050:9050 tor
$ curl -x socks5://localhost:9050 -k https://23.128.64.134/ip
curl: (7) Unable to receive initial SOCKS5 response.
$ curl -x socks4://localhost:9050 -k https://23.128.64.134/ip
curl: (7) Failed to …Run Code Online (Sandbox Code Playgroud)