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

Test: User supplied project name #2645

Closed
2 tasks done
chrmarti opened this issue Mar 30, 2020 · 5 comments
Closed
2 tasks done

Test: User supplied project name #2645

chrmarti opened this issue Mar 30, 2020 · 5 comments

Comments

@chrmarti
Copy link
Contributor

chrmarti commented Mar 30, 2020

Refs: #222

Complexity: 3


  • Run the Docker Compose setup: https://github.com/microsoft/vscode-remote-containers/blob/master/CONTRIBUTING.md#docker-compose
  • Note that docker ps -a shows the containers having names derived from the project folder name.
  • Change the project name and reopen the folder in a container:
    1. By setting the COMPOSE_PROJECT_NAME environment variable and starting Code from the terminal.
    2. By setting the COMPOSE_PROJECT_NAME environment variable in a .env file in the project folder.
  • Check with docker ps that the containers are named accordingly.
  • Note that the environment variable should win over the value in .env if both are given.
@JacksonKearl
Copy link
Contributor

JacksonKearl commented Mar 31, 2020

For me, the .env had to be in the parent directory of the docker-compose.yml (so the project directly rather than the .devcontainer directory). Is that expected?

@chrmarti
Copy link
Contributor Author

@JacksonKearl Not sure, which OS and docker-compose version are you on?

@JacksonKearl
Copy link
Contributor

docker-compose version 1.24.1, build 4667896b
docker-py version: 3.7.3
CPython version: 3.6.8
OpenSSL version: OpenSSL 1.1.0j  20 Nov 2018

macOS 10.14.6

@chrmarti
Copy link
Contributor Author

chrmarti commented Apr 2, 2020

@JacksonKearl You're right, the .env should be in the project folder (the working directory for the docker-compose command). Thanks for pointing this out.

@rebornix rebornix assigned rebornix and unassigned bpasero Apr 2, 2020
@rebornix
Copy link
Member

rebornix commented Apr 2, 2020

It works as described.

@rebornix rebornix closed this as completed Apr 2, 2020
@rebornix rebornix removed their assignment Apr 2, 2020
@vscodebot vscodebot bot locked and limited conversation to collaborators May 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants