docker-compose 로 띄운 이미지 컨테이너에서
amd64 경고 태그와 함께
Image may have poor performance, or fail, if run via emulation 문구를 확인할 수 있다.
Intel CPU 기반의 macOS나 Linux에서는 linux/amd64 아키텍처의 이미지를 사용하지만,
애플 실리콘 M1의 경우 ARM64 아키텍처 이미지를 우선적으로 사용한다고 한다...
🐳 linux/amd64 아키텍처와 linux/arm64/v8 아키텍처 구분
Mac m1 환경에서 하단의 yaml 파일을 실행해보자
docker-compose.yaml
version: '3.4'
services:
zookeeper:
platform: linux/amd64
image: quay.io/strimzi/kafka:0.23.0-kafka-2.8.0
command: [
"sh", "-c",
"bin/zookeeper-server-start.sh config/zookeeper.properties"
]
ports:
- "2181:2181"
environment:
LOG_DIR: /tmp/logs
networks:
- compose-networks
kafka:
image: quay.io/strimzi/kafka:0.23.0-kafka-2.8.0
platform: linux/amd64
command: [
"sh", "-c",
"bin/kafka-server-start.sh config/server.properties --override listeners=$${KAFKA_LISTENERS} --override advertised.listeners=$${KAFKA_ADVERTISED_LISTENERS} --override zookeeper.connect=$${KAFKA_ZOOKEEPER_CONNECT}"
]
depends_on:
- zookeeper
ports:
- "9092:9092"
environment:
LOG_DIR: "/tmp/logs"
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092
KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:9092
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
networks:
- compose-networks
networks:
compose-networks:
driver: bridge
⌨ docker-compose 파일과 같은 경로에서 command 입력
% docker-compose up
아래와 같이 그대로 경고가 출력된다
물론 경고가 떴다고 해서 컨테이너가 동작을 안하는 것은 아니다. 하지만 "poor performance"라는 말에 쫄았다
🐳 Docker hub 확인
* platform 지원 여부를 알아볼 수 있다
원하는 이미지를 검색한 후, 태그를 통해 검색하면 사용하고 있는 이미지가 어떤 os 아키텍처를 사용하고 있는지 알 수 있다.
nginx 이미지에서 필터 Oldest 정렬을 검색햇을 때, linux/amd64플랫폼에서만 사용할 수 있는 이미지들이 많이 검색된다
플랫폼이 한정적인 이미지
플랫폼을 다양하게 지원해주는 이미지
참고 사이트
https://stackoverflow.com/questions/67458621/how-to-run-amd64-docker-images-on-arm64-host-platform
how to run amd64 docker images on arm64 host platform
I have an m1 mac and I am trying to run a amd64 based docker image on my arm64 based host platform. However, when I try to do so (with docker run) I get the following error: WARNING: The requested ...
stackoverflow.com
https://www.reddit.com/r/docker/comments/p9a6wn/sql_server_using_docker_on_a_macbook_pro_m1_help/
SQL Server using Docker on a MacBook pro m1 help!
Hi I'm having a lot of trouble trying to get the SQL server working on my computer. I've followed every tutorial available and I'm not sure if...
www.reddit.com
'Issues' 카테고리의 다른 글
Intellij : setting() 환경변수 설정 - 계정정보, access key,,, (0) | 2024.11.06 |
---|---|
Intellij : setting() { not recognize tests in test folder } (0) | 2024.01.05 |
Git : ssh() { Github 에 SSH 등록 및 설정; } (0) | 2023.07.20 |
Github : how() { SSH 공개키 등록 } (0) | 2022.02.01 |
댓글