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

Fix dev container #1115

Merged
merged 14 commits into from
Dec 5, 2023
Merged

Fix dev container #1115

merged 14 commits into from
Dec 5, 2023

Conversation

ethho
Copy link
Contributor

@ethho ethho commented Dec 2, 2023

Followed the instructions in https://code.visualstudio.com/docs/devcontainers/create-dev-container to recreate the .devcontainer directory and contents from scratch, from the LNX-docker-compose.yml compose stack as a base. @A-Baji could you test to see if this works for you in VS code?

@ethho ethho requested a review from A-Baji December 2, 2023 03:47
@ethho ethho marked this pull request as ready for review December 2, 2023 03:49
Copy link
Collaborator

@A-Baji A-Baji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The container builds successfully now. The only issue is that it seems to be missing nosetest and the mysql CLI dependencies. These are listed as features in the current docs so it's best to include them. Also I'd set DJ_PASS to simple to be consistent with the example in the docs.

It's probably a good idea to test all the features mentioned in the docs. Once those work we'll be good to merge.

@ethho
Copy link
Contributor Author

ethho commented Dec 4, 2023

After changing any of the configuration in the LNX-docker-compose.yml or .devcontainer/*, one must do the following to accurately reproduce the dev container with a clean environment:

  1. Quit VS code if it is open
  2. Stop and remove all running Docker containers: docker ps -aq | xargs docker stop | xargs docker rm
  3. Reopen the repo in VS code: code .
  4. Issue the VS code command: Dev Containers: Rebuild Without Cache and Reopen in Container if the project is opened locally Dev Containers: Rebuild Container Without Cache if project is already open in dev container.

@ethho
Copy link
Contributor Author

ethho commented Dec 4, 2023

Also I'd set DJ_PASS to simple to be consistent with the example in the docs.

For MySQL 8.0 only (not 5.7), MYSQL_ROOT_PASSWORD is sometimes not respected, and switches to the image default password. I believe this happens when there is an existing data directory, see https://stackoverflow.com/questions/40149880/docker-mysql-root-password-do-not-work. I think the best option is to start using the MySQL default password password, and update the developer docs. But let me know if you think otherwise.

@A-Baji
Copy link
Collaborator

A-Baji commented Dec 4, 2023

I think the best option is to start using the MySQL default password password, and update the developer docs. But let me know if you think otherwise.

If that's the case then it makes sense 👍

@ethho
Copy link
Contributor Author

ethho commented Dec 5, 2023

DJ_PASS=password PY_VER=3.8 MYSQL_VER=8.0 DISTRO=alpine MINIO_VER=RELEASE.2022-08-11T04-37-28Z HOST_UID=$(id -u) docker compose -f LNX-docker-compose.yml up --exit-code-from app --build --always-recreate-deps --force-recreate now failing.

@ethho ethho merged commit 6d77392 into datajoint:dev-tests Dec 5, 2023
9 checks passed
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.

3 participants