Skip to content

Commit 5223cd1

Browse files
authored
DOC: Expanded Using a Docker Container section (#35345) (#35379)
1 parent ea92c45 commit 5223cd1

File tree

1 file changed

+28
-4
lines changed

1 file changed

+28
-4
lines changed

doc/source/development/contributing.rst

+28-4
Original file line numberDiff line numberDiff line change
@@ -153,14 +153,38 @@ to build the documentation locally before pushing your changes.
153153
Using a Docker container
154154
~~~~~~~~~~~~~~~~~~~~~~~~
155155

156-
Instead of manually setting up a development environment, you can use Docker to
157-
automatically create the environment with just several commands. Pandas provides a `DockerFile`
158-
in the root directory to build a Docker image with a full pandas development environment.
156+
Instead of manually setting up a development environment, you can use `Docker
157+
<https://docs.docker.com/get-docker/>`_ to automatically create the environment with just several
158+
commands. Pandas provides a `DockerFile` in the root directory to build a Docker image
159+
with a full pandas development environment.
159160

160-
Even easier, you can use the DockerFile to launch a remote session with Visual Studio Code,
161+
**Docker Commands**
162+
163+
Pass your GitHub username in the `DockerFile` to use your own fork::
164+
165+
# Build the image pandas-yourname-env
166+
docker build --tag pandas-yourname-env .
167+
# Run a container and bind your local forked repo, pandas-yourname, to the container
168+
docker run -it --rm -v path-to-pandas-yourname:/home/pandas-yourname pandas-yourname-env
169+
170+
Even easier, you can integrate Docker with the following IDEs:
171+
172+
**Visual Studio Code**
173+
174+
You can use the DockerFile to launch a remote session with Visual Studio Code,
161175
a popular free IDE, using the `.devcontainer.json` file.
162176
See https://code.visualstudio.com/docs/remote/containers for details.
163177

178+
**PyCharm (Professional)**
179+
180+
Enable Docker support and use the Services tool window to build and manage images as well as
181+
run and interact with containers.
182+
See https://www.jetbrains.com/help/pycharm/docker.html for details.
183+
184+
Note that you might need to rebuild the C extensions if/when you merge with upstream/master using::
185+
186+
python setup.py build_ext --inplace -j 4
187+
164188
.. _contributing.dev_c:
165189

166190
Installing a C compiler

0 commit comments

Comments
 (0)