datajoint / datajoint-python

Relational data pipelines for the science lab
https://datajoint.com/docs
GNU Lesser General Public License v2.1
163 stars 83 forks source link

Fix dev container #1115

Closed ethho closed 6 months ago

ethho commented 7 months ago

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 commented 6 months ago

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 commented 6 months ago

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 commented 6 months ago

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 :+1:

ethho commented 6 months ago

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.