Docker 的完全新手,但概念是坚持的。
目标
在本地创建一个与我的 prod EC2 实例匹配的容器。升级 PHP7 并测试我的应用程序。
方法
我的第一步是创建一个基本的盒子亚马逊 linux 盒子。挂载它并从 CLI 运行命令。然后我可以慢慢构建命令以放入我的 Dockerfile。
问题
我构建了盒子并运行 yum update -Y 并查看更新。但是,当我运行docker ps 时,没有列出图像?所以我无法安装它。我的作曲家文件如下...
FROM amazonlinux:2017.03
RUN yum update -y
Run Code Online (Sandbox Code Playgroud)
为什么盒子没有保持打开状态?
我们在Amazon Linux上使用Jenkins 2.138.1.我们正在尝试使用Maven Release插件从我们的SVN存储库构建.虽然我们可以很好地构建快照,但是当我们尝试使用目标进行Maven发布插件的干运行时
-Dresume=false -DdryRun=true release:prepare
Run Code Online (Sandbox Code Playgroud)
我们遇到了这个错误
Waiting for Jenkins to finish collecting data[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5.3:prepare (default-cli) on project springboard: Unable to check for local modifications
[ERROR] Provider message:
[ERROR] The svn command failed.
[ERROR] Command output:
[ERROR] svn: /opt/bitnami/common/lib/libsasl2.so.2: no version information available (required by /usr/lib/x86_64-linux-gnu/libsvn_ra_svn-1.so.1)
[ERROR] svn: /opt/bitnami/common/lib/libssl.so.1.0.0: no version information available (required by /usr/lib/x86_64-linux-gnu/libserf-1.so.1)
[ERROR] svn: /opt/bitnami/common/lib/libcrypto.so.1.0.0: no version information available (required by /usr/lib/x86_64-linux-gnu/libserf-1.so.1)
[ERROR] svn: symbol lookup error: /usr/lib/x86_64-linux-gnu/libsvn_subr-1.so.1: undefined symbol: apr_crypto_block_cleanup …Run Code Online (Sandbox Code Playgroud) 我在亚马逊linux中运行docker.我已经为特定操作设置了一个cron作业.它返回一个错误,指出无法为指定的会话 Docker版本创建/删除条目:1.12.6(客户端和服务器)API版本:1.24(客户端和服务器)
我有下面想要构建的Dockerfile.它基本上只是普通的jboss/wildfly基本图像,但是用amazonlinux而不是centOS构建.
构建错误出现"groupadd:Command not found"行
发生这种情况后,我第一次添加"epel"仓库,并尝试手动安装,如您在第一个RUN指令中看到的那样.我已经阅读了几个论坛,似乎有时当你没有以root用户身份运行时,你会收到该错误消息.我做了一个"whoami",我以root身份运行,所以它应该不是问题.
任何人都知道我为什么还会收到错误?
FROM amazonlinux:2017.03
# Install packages necessary to run EAP
RUN yum-config-manager --enable epel && yum update -y && yum -y install groupadd xmlstarlet saxon augeas bsdtar unzip && yum clean all
# Create a user and group used to launch processes
# The user ID 1000 is the default for the first "regular" user on Fedora/RHEL,
# so there is a high chance that this ID will be equal to the current user
# …Run Code Online (Sandbox Code Playgroud) 我正在尝试在 Amazon Linux 机器上安装 Chromium(或 Chrome,以哪个为准)。
我尝试了很多步骤,无济于事。这是我尝试过的:
yum install epel # worked
yum install chromium
Run Code Online (Sandbox Code Playgroud)
生成的错误消息:
Run Code Online (Sandbox Code Playgroud)Error: Package: chromium-31.0.1650.63-2.el6.x86_64 (chromium-el6) Requires: libgnome-keyring.so.0()(64bit) Error: Package: chromium-31.0.1650.63-2.el6.x86_64 (chromium-el6) Requires: libgtk-x11-2.0.so.0()(64bit) Error: Package: chromium-31.0.1650.63-2.el6.x86_64 (chromium-el6) Requires: libgdk_pixbuf-2.0.so.0()(64bit) Error: Package: chromium-31.0.1650.63-2.el6.x86_64 (chromium-el6) Requires: libXss.so.1()(64bit) Error: Package: chromium-31.0.1650.63-2.el6.x86_64 (chromium-el6) Requires: libgdk-x11-2.0.so.0()(64bit) Error: Package: chromium-31.0.1650.63-2.el6.x86_64 (chromium-el6) Requires: libcanberra-gtk2(x86-64) Error: Package: chromium-31.0.1650.63-2.el6.x86_64 (chromium-el6) Requires: libatk-1.0.so.0()(64bit)
我尝试下载 Chrome RPM,包括最新的稳定版本和特定版本,然后运行
yum install google-chrome-stable-64.0.3282.119-1.x86_64.rpm
Run Code Online (Sandbox Code Playgroud)
它产生了相同的错误消息
从https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html?prefix=Linux_x64/532015/下载的二进制文件
运行它生成了错误消息
加载共享库时出错:libXcursor.so.1:无法打开共享对象文件:没有这样的文件或目录 …
google-chrome amazon-ec2 chromium amazon-web-services amazon-linux
amazonlinux:2018.03.0.20190212在bitbucket管道中的docker映像上构建R时遇到错误。奇怪的是,如果我运行EC2(Amazon Linux 2018),则可以运行完全相同的命令而不会出错。
有谁知道如何解决这个问题?
make[6]: Entering directory `/opt/R/src/library/graphics/src'
mkdir -p -- ../../../../library/graphics/libs
make[6]: Leaving directory `/opt/R/src/library/graphics/src'
make[5]: Leaving directory `/opt/R/src/library/graphics/src'
make[4]: Leaving directory `/opt/R/src/library/graphics'
make[4]: Entering directory `/opt/R/src/library/graphics'
byte-compiling package 'graphics'
Error : .onLoad failed in loadNamespace() for 'utils', details:
call: system(paste(which, shQuote(names[i])), intern = TRUE, ignore.stderr = TRUE)
error: error in running command
Error: unable to load R code in package 'graphics'
Execution halted
Run Code Online (Sandbox Code Playgroud)
在EC2上手动进行:
make[6]: Leaving directory `/opt/R/src/library/graphics/src'
make[5]: Leaving directory `/opt/R/src/library/graphics/src'
make[4]: Leaving directory `/opt/R/src/library/graphics'
make[4]: …Run Code Online (Sandbox Code Playgroud) 我执行了以下操作,但无法安装 pip3。任何帮助表示赞赏!
sudo yum install python3 pip3
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
Package python3-3.7.9-1.amzn2.0.2.x86_64 already installed and latest version
No package pip3 available.
Nothing to do
Run Code Online (Sandbox Code Playgroud)
我在此之前运行 sudo yum update 没有任何问题。
我发现的帖子表明这应该有效。
这是 Amazon Linux 2 上的最新 AMI 中的内容。
我从一年前提出的系统中设置了注释,当时就可以使用了。他们打破了什么东西吗?
我正在尝试使用以下配置在 Amazon Linux 中安装 mongodb
NAME="Amazon Linux"
VERSION="2023"
ID="amzn"
ID_LIKE="fedora"
VERSION_ID="2023"
PLATFORM_ID="platform:al2023"
PRETTY_NAME="Amazon Linux 2023"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2023"
HOME_URL="https://aws.amazon.com/linux/"
BUG_REPORT_URL="https://github.com/amazonlinux/amazon-linux-2023"
SUPPORT_END="2028-03-01"
Run Code Online (Sandbox Code Playgroud)
我尝试使用 Tarball 和 repo 进行安装。但是它失败并出现以下错误
[root@ip ~]# mongod --version
mongod: /lib64/libcrypto.so.10: version `OPENSSL_1.0.2' not found (required by mongod)
mongod: /lib64/libcrypto.so.10: version `libcrypto.so.10' not found (required by mongod)
mongod: /lib64/libssl.so.10: version `libssl.so.10' not found (required by mongod)
[root@ip ~]# openssl version
OpenSSL 3.0.8 7 Feb 2023 (Library: OpenSSL 3.0.8 7 Feb 2023)
[root@i ~]#
Run Code Online (Sandbox Code Playgroud)
tar -zxvf mongodb-linux-x86_64-amazon2-6.0.5.tgz
mongod version
Run Code Online (Sandbox Code Playgroud) 试图在亚马逊上安装pgbouncer遇到了这个:
[root@somehost ~]# uname -a
Linux somehost 4.4.35-33.55.amzn1.x86_64 #1 SMP Tue Dec 6 20:30:04 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
[root@somehost ~]# yum install pgbouncer
Loaded plugins: priorities, update-motd, upgrade-helper
No package pgbouncer available.
Error: Nothing to do
Run Code Online (Sandbox Code Playgroud)
去了github - 发现只有compilable版本.谷歌搜索并决定在下面发布解决方案
我刚刚使用来自亚马逊的aws 提供的图像在我的 Windows 10 管理程序上安装了 amazon linux 。我能够成功登录。但是,当我执行yum 安装任何东西时,它只会失败并显示错误“无法解析主机:cdn.amazonlinux.com”。以下是完整片段
[root@cloudimg yum]# yum install curl
Loaded plugins: langpacks, priorities, update-motd
https://cdn.amazonlinux.com/2/core/2.0/x86_64/f5ab60d117aab318ddc588ab7dbac074cc20ddf36a924287c55fbd593496ae79/repodata/repomd.xml?instance_id=fail®ion=URLError: [Errno 14] curl#6 - "Could not resolve host: cdn.amazonlinux.com"
Trying other mirror.
https://cdn.amazonlinux.com/2/extras/docker/18.09.9/x86_64/6f06d82b5b1fa3d35af7a537bd9f3fa1d95d238361558bbb1e6a47c219c3adb2/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: cdn.amazonlinux.com"
Trying other mirror.
amzn2extra-docker/2/x86_64/pri FAILED
https://cdn.amazonlinux.com/2/extras/docker/18.09.9/x86_64/6f06d82b5b1fa3d35af7a537bd9f3fa1d95d238361558bbb1e6a47c219c3adb2/repodata/primary.sqlite.gz: [Errno 14] curl#6 - "Could not resolve host: cdn.amazonlinux.com"
Trying other mirror.
https://cdn.amazonlinux.com/2/extras/docker/18.09.9/x86_64/6f06d82b5b1fa3d35af7a537bd9f3fa1d95d238361558bbb1e6a47c219c3adb2/repodata/primary.sqlite.gz: [Errno 14] curl#6 - "Could not resolve host: cdn.amazonlinux.com"
Trying other mirror.
One of the …Run Code Online (Sandbox Code Playgroud)