0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

rosetta error: Rosetta is only intended to run on Apple Silicon with a macOS host using Virtualization.framework with Rosetta mode enabled

Posted at

問題

最近、macOSをバージョンアップした後、Dockerコンテナが立ち上がらなくなりました...orz
(有給期間中にバージョンアップしていたので出勤して焦りました...)

$ docker compose up --build
[+] Running 1/0
 ✔ Container mysql  Recreated                                                                                                                                                                                                                  0.0s
Attaching to mysql
mysql  | rosetta error: Rosetta is only intended to run on Apple Silicon with a macOS host using Virtualization.framework with Rosetta mode enabled
mysql  |
mysql exited with code 133
mysql  | rosetta error: Rosetta is only intended to run on Apple Silicon with a macOS host using Virtualization.framework with Rosetta mode enabled
mysql  |  rosetta error: Rosetta is only intended to run on Apple Silicon with a macOS host using Virtualization.framework with Rosetta mode enabled
...

参考程度に docker-compose.ymlの設定を載せておきます

services:
  mysql:
    container_name: mysql
    image: mysql:8.0.28
    platform: linux/amd64
    restart: always
    command: mysqld --default-authentication-plugin=mysql_native_password --character-set-server=utf8mb4 --collation-server=utf8mb4_general_ci
    ports:
      - "3306:3306"
    environment:
      MYSQL_ROOT_PASSWORD: $MYSQL_ROOT_PASSWORD
      MYSQL_USER: $MYSQL_USER
      MYSQL_PASSWORD: $MYSQL_PASSWORD
    healthcheck:
      test: mysqladmin ping -h mysql -u $$MYSQL_ROOT_USER -p$$MYSQL_ROOT_PASSWORD
volumes:
  mysql-data:
    driver: local

解決策

この問題は、Docker Desktopを最新バージョンにアップデートすることで解決しました。

手順

  • Docker Desktopのアップデート

Docker Desktopを開き、設定メニューから「Check for Updates」を選択します。
最新バージョンがある場合は、指示に従ってアップデートを行います。

まとめ

ソフトウェアアップデートでDockerが動かなくなるのは怖いですね...w
でも、定期的なアップデートは重要です。バックアップを忘れずに、問題が起きたら情報を集めて柔軟に対応しましょう。これからも安心して開発を続けられるように、最新の技術に対応していきたいですね!

参考

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?