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

Add docker override file name to .gitignore #1017

Merged
merged 3 commits into from Aug 24, 2023

Conversation

miminari
Copy link
Member

We need to override the docker file to build a local environment with docker on m1 Mac, so I add that filename to gitignore.
And I also add .DS_Store files are created by the Mac OS X operating system.

Props @ryelle

How to test the changes in this Pull Request:

  1. Checkout new branch.
  2. Add a docker-compose.override.yaml and a .DS_Store file.
  3. Git add, git status, you can check to ignore these files.

@ryelle
Copy link
Contributor

ryelle commented Aug 24, 2023

@miminari Thanks again for the PR! I've pushed two commits to this branch. One to move the docker override file to the "Docker" section. The other change removes the .DS_Store from the gitignore. In the comments to this PR #139 it was decided that system files like that should be ignored globally, not in the project configuration.

@ryelle ryelle merged commit 717b0a6 into WordPress:production Aug 24, 2023
@miminari
Copy link
Member Author

@ryelle Thank you for commit and merge!

@2ndkauboy
Copy link
Contributor

Haha, great that this was added. In a different issue I experienced today at WCUS Contributor Day, I also had to add such a file :)

@miminari what overwrite is necessary for an M1? I was about to add an example.docker-compose.override.yml and might add your customization into it as well.

@miminari
Copy link
Member Author

@2ndkauboy Hi, I just added same codes written on this docs.

https://github.com/WordPress/wordcamp.org/blob/production/.docker/readme.md

'''
Using an Apple ARM64 (Silicon) chip? You may see failed to solve: rpc error: code = Unknown desc =... or failed to solve: mysql:5.7-debian: no match for platform in manifest after running either of commands above. Try adding platform: linux/amd64 to both wordcamp.test and wordcamp.db in docker-compose.yaml. This will instruct Docker to create an image based on the linux/amd64 architecture instead of linux/arm64, i.e.
wordcamp.test:
build:
context: .docker
dockerfile: Dockerfile.php-fpm
platform: linux/amd64

wordcamp.db:
build:
context: .docker
dockerfile: Dockerfile.mysql
platform: linux/amd64
'''

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 this pull request may close these issues.

None yet

3 participants