Closed9
Amazon Linux 2023 を Docker で
環境
% sw_vers
ProductName: macOS
ProductVersion: 13.2
BuildVersion: 22D49
% docker --version
Docker version 20.10.20, build 9fdeb9c
Docker Hub のイメージを使ってみる。
% docker run -it --rm amazonlinux:2023 /bin/bash
バージョン確認
bash-5.2# cat /etc/system-release
Amazon Linux release 2023 (Amazon Linux)
bash-5.2# cat /etc/os-release
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"
イメージのサイズ確認
% docker images | grep linux
amazonlinux 2023 28ed914b41df 10 days ago 178MB
systemctl がない(そりゃそうだ)
bash-5.2# systemctl list-unit-files --type=service
bash: systemctl: command not found
ECR のイメージを試してみる。
% aws-vault exec oppara -- aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws
Login Succeeded
% docker run -it --rm public.ecr.aws/amazonlinux/amazonlinux:2023 /bin/bash
systemctl はない
bash-5.2# systemctl list-unit-files --type=service
bash: systemctl: command not found
% docker images | grep linux
public.ecr.aws/amazonlinux/amazonlinux 2023 871396059577 3 days ago 178MB
amazonlinux 2023 28ed914b41df 10 days ago 178MB
EC2 で試す
このスクラップは2023/03/29にクローズされました