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 support to run development/build in a docker container #7

Closed
NevarrTivianne opened this issue Sep 23, 2020 · 0 comments
Closed
Assignees

Comments

@NevarrTivianne
Copy link
Contributor

NevarrTivianne commented Sep 23, 2020

Apologies for not doing a PR but you might want to switch things around.

# cat docker/Dockerfile
FROM openjdk:11.0.8-slim-buster

RUN apt-get update && \                                                         
    apt-get install -y nodejs npm && \                                          
    npm install -g yarn                                                         
WORKDIR /data

# cd docker && docker built -t everoute11 .

Running it:

docker run -it -v "${PWD}:/data" -p "8080:8080" -rm everoute11 bash

Inside both frontend and backend building works.

One major downside: gradle will install itself into /root/.gradle (550 MB here) and you lose that progress.

I solved that with another mkdir .gradle-home && ln -s /data/.gradle-home /root/.gradle in the container's bash, but this should be done in the Dockerfile. Then add .gradle-home to .gitignore

Also connecting to mongo:27017 instead of localhost.

@tkhamez tkhamez self-assigned this Sep 26, 2020
@tkhamez tkhamez closed this as completed in 08b3201 Oct 4, 2020
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

No branches or pull requests

2 participants