Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update tasks.json docker-compose for Apple Silicon Compatibility #5

Closed
esilvaju opened this issue Oct 26, 2023 · 1 comment · May be fixed by #6
Closed

Update tasks.json docker-compose for Apple Silicon Compatibility #5

esilvaju opened this issue Oct 26, 2023 · 1 comment · May be fixed by #6

Comments

@esilvaju
Copy link

To enable compatibility for VSCode tasks (docker-compose) on Apple Silicon architecture, we must implement modifications to our tasks.json file.

https://github.com/maany/rucio-vscode-dev-env/blob/c046f98d7657ab40ba142f8f945b4fdf139c47bf/tasks.json#L4C1-L16C5

to:

			"label": "start-containers",
			"type": "docker-compose",
			"options": {
                "env": {
                    "DOCKER_DEFAULT_PLATFORM": "linux/amd64"
                }
            },
			"dockerCompose": {
				"up": {
					"detached": true,
					"build": true
				},
				"files": [
					"${workspaceFolder}/.vscode/docker-compose.yml"
				]
			},
		},

This setting will tell to docker to use linux/amd64 as a default plataform for docker-compose tasks.

A Mac with Apple silicon is capable of running code compiled for the x86_64 instruction set using a translation mechanism called Rosetta 2.

Rosetta 2 is a pre-req to run x86_64 on Apple Silicon.

@esilvaju
Copy link
Author

This will be covered on Rucio documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant