我正在尝试使用pip install uwsgi我的Alpine docker图像安装uwsgi 但不幸的是它一直没有出现奇怪的错误信息给我:
Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-mEZegv/uwsgi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-c7XA_e-record/install-record.txt --single-version-externally-managed --compile:
running install
using profile: buildconf/default.ini
detected include path: ['/usr/include/fortify', '/usr/include', '/usr/lib/gcc/x86_64-alpine-linux-musl/5.3.0/include']
Patching "bin_name" to properly install_scripts dir
detected CPU cores: 1
configured CFLAGS: -O2 -I. -Wall -Werror -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fno-strict-aliasing -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -DUWSGI_HAS_IFADDRS -DUWSGI_ZLIB -DUWSGI_LOCK_USE_MUTEX -DUWSGI_EVENT_USE_EPOLL -DUWSGI_EVENT_TIMER_USE_TIMERFD -DUWSGI_EVENT_FILEMONITOR_USE_INOTIFY -DUWSGI_VERSION="\"2.0.12\"" -DUWSGI_VERSION_BASE="2" -DUWSGI_VERSION_MAJOR="0" -DUWSGI_VERSION_MINOR="12" -DUWSGI_VERSION_REVISION="0" -DUWSGI_VERSION_CUSTOM="\"\"" -DUWSGI_YAML -DUWSGI_PLUGIN_DIR="\".\"" -DUWSGI_DECLARE_EMBEDDED_PLUGINS="UDEP(python);UDEP(gevent);UDEP(ping);UDEP(cache);UDEP(nagios);UDEP(rrdtool);UDEP(carbon);UDEP(rpc);UDEP(corerouter);UDEP(fastrouter);UDEP(http);UDEP(ugreen);UDEP(signal);UDEP(syslog);UDEP(rsyslog);UDEP(logsocket);UDEP(router_uwsgi);UDEP(router_redirect);UDEP(router_basicauth);UDEP(zergpool);UDEP(redislog);UDEP(mongodblog);UDEP(router_rewrite);UDEP(router_http);UDEP(logfile);UDEP(router_cache);UDEP(rawrouter);UDEP(router_static);UDEP(sslrouter);UDEP(spooler);UDEP(cheaper_busyness);UDEP(symcall);UDEP(transformation_tofile);UDEP(transformation_gzip);UDEP(transformation_chunked);UDEP(transformation_offload);UDEP(router_memcached);UDEP(router_redis);UDEP(router_hash);UDEP(router_expires);UDEP(router_metrics);UDEP(transformation_template);UDEP(stats_pusher_socket);" -DUWSGI_LOAD_EMBEDDED_PLUGINS="ULEP(python);ULEP(gevent);ULEP(ping);ULEP(cache);ULEP(nagios);ULEP(rrdtool);ULEP(carbon);ULEP(rpc);ULEP(corerouter);ULEP(fastrouter);ULEP(http);ULEP(ugreen);ULEP(signal);ULEP(syslog);ULEP(rsyslog);ULEP(logsocket);ULEP(router_uwsgi);ULEP(router_redirect);ULEP(router_basicauth);ULEP(zergpool);ULEP(redislog);ULEP(mongodblog);ULEP(router_rewrite);ULEP(router_http);ULEP(logfile);ULEP(router_cache);ULEP(rawrouter);ULEP(router_static);ULEP(sslrouter);ULEP(spooler);ULEP(cheaper_busyness);ULEP(symcall);ULEP(transformation_tofile);ULEP(transformation_gzip);ULEP(transformation_chunked);ULEP(transformation_offload);ULEP(router_memcached);ULEP(router_redis);ULEP(router_hash);ULEP(router_expires);ULEP(router_metrics);ULEP(transformation_template);ULEP(stats_pusher_socket);"core/utils.c: In function 'uwsgi_as_root':
core/utils.c:344:7: error: …Run Code Online (Sandbox Code Playgroud) 我目前在golang:1.6.2-alpine docker容器上安装了goczmq(https://github.com/zeromq/goczmq),如下所示:
wget https://download.libsodium.org/libsodium/releases/libsodium-1.0.10.tar.gz
wget https://download.libsodium.org/libsodium/releases/libsodium-1.0.10.tar.gz.sig
wget https://download.libsodium.org/jedi.gpg.asc
gpg --import jedi.gpg.asc
gpg --verify libsodium-1.0.10.tar.gz.sig libsodium-1.0.10.tar.gz
tar zxvf libsodium-1.0.10.tar.gz
cd libsodium-1.010.
./configure; make check
sudo make install
sudo ldconfig
Run Code Online (Sandbox Code Playgroud)
这个过程失败了ldconfig,似乎有一个命令ldconfig,但我不认为它实际上是功能性的.任何见解?先感谢您.
为了成功将私有存储库克隆到基于Alpine的docker中,我需要运行以下命令:
ssh-keyscan github.com >> ~/.ssh/known_hosts.
但由于ssh-keyscan不是Alpine linux的一部分(默认情况下),我必须首先使用apk安装它.问题是:我不知道如何 - 我无法在谷歌的任何地方找到它.
我正在构建一个新的Docker镜像:
FROM alpine:3.4
RUN apk upgrade --update
Run Code Online (Sandbox Code Playgroud)
然而,它失败了错误:
[INFO] /bin/sh: apk: not found
Run Code Online (Sandbox Code Playgroud)
这似乎在我的本地机器(Mac OSX)上正常工作,但是当我尝试在Linux CentOS 7机器上构建它时它失败了.
在本地,我通过以下方式成功安装了npm @ 5:
$ npm install npm@5 -g
$ npm -v
$ 5.0.0
Run Code Online (Sandbox Code Playgroud)
在本地,我可以运行npm设置就好了(它基本上是npm i && tsc)
$ npm run setup
updated 102 packages in 3.499s
Run Code Online (Sandbox Code Playgroud)
然而,现在我还有一个基于node:7.10-alpine图像的Dockerfile ,如果我尝试在npm@5那里安装就会中断.
我的Dockerfile看起来像这样:
FROM node:7.10-alpine
WORKDIR /usr/hive-updater/
ENV LAST_UPDATED=2016-12-08 NPM_CONFIG_LOGLEVEL=warn TERM=xterm PATH="$PATH:/usr/hive-updater/node_modules/.bin"
RUN npm install npm@5 -g && npm -v
COPY ./ ./
RUN npm run setup
CMD ["node"]
Run Code Online (Sandbox Code Playgroud)
这将在以下期间失败npm -v:
module.js:472
throw err;
^
Error: Cannot find module 'semver'
at Function.Module._resolveFilename (module.js:470:15)
at Function.Module._load (module.js:418:25) …Run Code Online (Sandbox Code Playgroud) 我正在尝试构建一个具有openjdk:8-alpine作为基础的docker镜像.
问题是当我尝试执行script.sh时,返回以下消息:
/bin/sh: bin/script.sh: not found
Run Code Online (Sandbox Code Playgroud)
该script.sh是在斌/文件夹正确的,这就是为什么我不知道有什么问题就.
任何人都有任何想法?
谢谢.
我尝试使用“远程容器:在容器中重新打开”在容器中运行 Visual Studio 代码。为此,我有以下文件夹结构:
.devcontainer/
devcontainer.env
devcontainer.json
Dockerfile
certs.pem
Run Code Online (Sandbox Code Playgroud)
我可以毫无问题地构建 docker 映像,但仍然无法创建容器,因为下载和安装 VS Code Server 时出现问题:
.devcontainer/
devcontainer.env
devcontainer.json
Dockerfile
certs.pem
Run Code Online (Sandbox Code Playgroud)
然后我尝试按照 jia2 和 Cliffburdick 的建议手动执行此操作: https: //github.com/microsoft/vscode-remote-release/issues/78。
所以我将以下几行添加到我的 Dockerfile 中:
Support for Alpine Linux is in preview.
[14250 ms] Start: Run in container: test -d /home/<name>/.vscode-server/bin/26076a4de974ead31f97692a0d32f90d735645c0
[14252 ms]
[14252 ms]
[14252 ms] Exit code 1
[14252 ms] Installing VS Code Server for commit 26076a4de974ead31f97692a0d32f90d735645c0
[14252 ms] Start: Run in container: mkdir -p /home/<name>/.vscode-server/bin/26076a4de974ead31f97692a0d32f90d735645c0_1590499133646
[14254 ms]
[14254 ms]
[14254 …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用 docker 运行部署,并且使用以下命令成功运行:
\ndocker build -t romenigld/blog-prod .
但是当我尝试使用这个命令时:
\ndocker run --env-file .env -p 8080:4000 romenigld/blog-prod
我收到此错误:
\nError loading shared library libstdc++.so.6: No such file or directory (needed by /app/erts-12.0.2/bin/beam.smp)\nError loading shared library libgcc_s.so.1: No such file or directory (needed by /app/erts-12.0.2/bin/beam.smp)\nError relocating /app/erts-12.0.2/bin/beam.smp: __cxa_begin_catch: symbol not found\nError relocating /app/erts-12.0.2/bin/beam.smp: _ZSt24__throw_out_of_range_fmtPKcz: symbol not found\nError relocating /app/erts-12.0.2/bin/beam.smp: _Znwm: symbol not found\nError relocating /app/erts-12.0.2/bin/beam.smp: _ZSt20__throw_length_errorPKc: symbol not found\nError relocating /app/erts-12.0.2/bin/beam.smp: __cxa_guard_release: symbol not found\nError relocating /app/erts-12.0.2/bin/beam.smp: _ZNKSt8__detail20_Prime_rehash_policy11_M_next_bktEm: …Run Code Online (Sandbox Code Playgroud) 是否有一个适用于Alpine的软件包允许我为Python 3安装PyCrypto?
遇到问题后pip3 install pycrypto,我偶然发现了这个帖子里面介绍了如何在高山安装numpy的使用apk add py-numpy@testing.PyCrypto也可以使用Python2.7安装apk add py-crypto.但是,我似乎无法弄清楚如何为Python3调用pycrypto,即使这个包存在.
作为替代解决方案,我尝试使用C编译器gcc,apk add gcc以便pip3 install pycrypto可以编译设置工具.但是,当我用gcc运行该命令时,它会抛出一个致命的错误:
...
running build_ext
running build_configure
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/tmp/pip-build-2TivSm/pycrypto':
configure: error: C compiler cannot create executables
...
Run Code Online (Sandbox Code Playgroud)
有无法在Alpine中编译Python3模块吗?
解决了哇,这些家伙很快......基本上就是这个https://github.com/pyca/cryptography/issues/2750事实证明,openssl的安全更新已经发布(DROWN Attack),并且该更新包含了一个意想不到的功能签名更改导致不兼容,所以这对我来说只是运气不好.
我需要pip install cryptography在运行Alpine Linux的Docker容器中使用.实际上,它是另一个模块,service_identity但问题在于cryptography模块,它是一个依赖项.
我有以下Dockerfile
FROM alpine:3.3
RUN apk --update add build-base libffi-dev openssl-dev python-dev py-pip
RUN pip install cryptography
Run Code Online (Sandbox Code Playgroud)
失败,出现以下错误
generating cffi module 'build/temp.linux-x86_64-2.7/_openssl.c'
building '_openssl' extension
creating build/temp.linux-x86_64-2.7/build
creating build/temp.linux-x86_64-2.7/build/temp.linux-x86_64-2.7
gcc -fno-strict-aliasing -Os -fomit-frame-pointer -DNDEBUG -Os -fomit-frame-pointer -fPIC -I/usr/include/python2.7 -c build/temp.linux-x86_64-2.7/_openssl.c -o build/temp.linux-x86_64-2.7/build/temp.linux-x86_64-2.7/_openssl.o
build/temp.linux-x86_64-2.7/_openssl.c:726:6: error: conflicting types for 'BIO_new_mem_buf'
BIO *BIO_new_mem_buf(void *, int);
^
In file included from /usr/include/openssl/asn1.h:65:0,
from build/temp.linux-x86_64-2.7/_openssl.c:434:
/usr/include/openssl/bio.h:692:6: note: previous declaration of 'BIO_new_mem_buf' …Run Code Online (Sandbox Code Playgroud) alpine-linux ×10
docker ×7
dockerfile ×2
linux ×2
python ×2
bash ×1
elixir ×1
github ×1
npm ×1
openssl ×1
pycrypto ×1
python-3.x ×1
shell ×1
uwsgi ×1