Closed9

Amazon Linux 2023 を Docker で

opparaoppara

環境

% sw_vers
ProductName:            macOS
ProductVersion:         13.2
BuildVersion:           22D49

% docker --version
Docker version 20.10.20, build 9fdeb9c
opparaoppara

Docker Hub のイメージを使ってみる。

% docker run -it --rm amazonlinux:2023 /bin/bash
opparaoppara

バージョン確認

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"
opparaoppara

イメージのサイズ確認

% docker images | grep linux
amazonlinux     2023       28ed914b41df   10 days ago     178MB
opparaoppara

systemctl がない(そりゃそうだ)

bash-5.2# systemctl list-unit-files --type=service
bash: systemctl: command not found
opparaoppara

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
opparaoppara
% docker images | grep linux
public.ecr.aws/amazonlinux/amazonlinux  2023   871396059577 3 days ago    178MB
amazonlinux                             2023   28ed914b41df 10 days ago   178MB
このスクラップは2023/03/29にクローズされました