Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Add a script to start docker container with development environment #3366

Conversation

nwangtw
Copy link
Contributor

@nwangtw nwangtw commented Oct 18, 2019

Mac dev environment could be tricky to set up since it requires Xcode's toolchain, and it is not easy to troubleshoot. This docker script can be useful for compiling source code without any setup other than installing Docker.

To use the script to create a docker image and run it:
$ sh docker/scripts/dev-env.sh

Write down the Docker container id (you can also find it with this command: "docker ps -a"). Next time you can run "docker container exec -it CONTAINER_ID bash" to start a new shell in the same container.

In the container:
$ ./bazel_config.py
$ bazel build --config=ubuntu heron/...

This is just the first version. There are a lot of room to improve. Any feedback is welcome~

# Default platform is ubuntu18.04. Other available platforms
# include centos7
TARGET_PLATFORM=${1:-"ubuntu18.04"}
SCRATCH_DIR="docker"
Copy link
Member

Choose a reason for hiding this comment

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

Do you think we should make SCRATCH_DIR configurable by accepting an argument as the script is executed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Make sense. Also "docker" is not ideal for the scratch dir. Updated and cleaned up in the new push.

@nwangtw nwangtw force-pushed the nwang/add_docker_script_for_linux_dev_environment branch from b8ec5ef to 9dbab19 Compare October 18, 2019 21:30
@nwangtw
Copy link
Contributor Author

nwangtw commented Oct 19, 2019

Still can't add @xiaoyao1991 so far. :(

@nwangtw nwangtw merged commit d950db5 into apache:master Oct 19, 2019
sreev pushed a commit to sreev/incubator-heron that referenced this pull request Apr 9, 2020
…pache#3366)

* Add a script to start docker container with development environment

* update

* update comments for starting a new shell

* map ports 8888 and 8889
nicknezis pushed a commit that referenced this pull request Sep 14, 2020
…3366)

* Add a script to start docker container with development environment

* update

* update comments for starting a new shell

* map ports 8888 and 8889
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants