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

Some debug build changes #335

Closed
wants to merge 1 commit into from
Closed

Some debug build changes #335

wants to merge 1 commit into from

Conversation

Nutomic
Copy link
Member

@Nutomic Nutomic commented Nov 12, 2019

Not sure why the dev dockerfile builds a release, makes more sense like this. The rm call doesnt really do anything that I can tell (it definitely wont save space like this).

For the update file, I added sudo because of this. But I can remove that and run sudo ./docker_update.sh if you prefer that way. I also removed the -d flag so logs are easier to see. The more I think about this, the more I feel we should just get rid of this file and put the command into the readme...

Last change is adding the intellij folder to .gitignore. Btw, I'm curious what setup/IDE you use for development. Intellij + Docker seems cool, but not perfect.

@dessalines
Copy link
Member

This is the dev docker, but doing a --release still makes sense because this is the dockerfile that builds the prod images. It only takes a few extra seconds, and all the deps are cached anyway. Once it builds once, rebuilds from code changes only take a few seconds (as long as docker is properly saying "using cache" for each step.

The building a fake project with the Cargo.toml and the rm are necessary for some weird reason for the rust caching, which people had to do in a strange way because rust has no --dependencies only build step for docker's cache. Here's where ppl show how to do that, and where this is from: rust-lang/cargo#2644

@Nutomic
Copy link
Member Author

Nutomic commented Nov 12, 2019

Ah okay, it would be nice to add that link as a comment in the Dockerfile then. I would have thought that release mode would be much slower to build, and also make debugging more difficult. But you obviously know this better than me, so I will just close this.

@Nutomic Nutomic closed this Nov 12, 2019
@dessalines
Copy link
Member

We can reopen this, and I can make an additional one that keeps the --release for the deploy.

@Nutomic
Copy link
Member Author

Nutomic commented Nov 13, 2019

Oh, I didnt even realize that the same Dockerfile is used for debug and release. I'm not sure if a seperate one is needed, but if not, lets at least move the Dockerfiles outside the dev folder ;)

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

2 participants