# Revise not triggering in Docker container with mounted volume

**URL:** <https://discourse.julialang.org/t/revise-not-triggering-in-docker-container-with-mounted-volume/27631>\
**Category:** General Usage\
**Created:** [August 16, 2019, 8:36pm UTC](https://discourse.julialang.org/t/revise-not-triggering-in-docker-container-with-mounted-volume/27631 "2019-08-16T20:36:29Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![essenciary](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/essenciary/32/210469_2.png) [@essenciary](https://discourse.julialang.org/u/essenciary)\
**Post date:** [August 16, 2019, 8:36pm UTC](https://discourse.julialang.org/t/revise-not-triggering-in-docker-container-with-mounted-volume/27631/1 "2019-08-16T20:36:30Z")

</div>

I have a docker container based off `julia:latest`. The container is configured to run Julia apps and I mount the local app folder into the container. So Julia runs within the container while the files are edited on the host and the updates are visible in the container.

`Revise` however does not trigger. Is it a known issue or am I missing something? If it’s a known issue, what’s the recommended workflow to develop Julia apps in Docker containers? Thanks!

This is how I start the container:

```julia
$ docker run -it --rm -p 8000:8000 --name geniedev -v /Users/adrian/Projects/testapp:/app genie bin/repl

```

or

```julia
docker run -it --rm -p 8000:8000 --name geniedev --mount 'type=bind,src=/Users/adrian/Projects/testapp,dst=/app' genie bin/repl

```

with the same effect.

---

<div class="post-metadata">

**Author:** ![essenciary](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/essenciary/32/210469_2.png) [@essenciary](https://discourse.julialang.org/u/essenciary)\
**Post date:** [August 17, 2019, 11:46am UTC](https://discourse.julialang.org/t/revise-not-triggering-in-docker-container-with-mounted-volume/27631/2 "2019-08-17T11:46:11Z")

</div>

A final attempt to resurface this, in case anybody tried using Julia in Docker with Revise.

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [August 17, 2019, 12:18pm UTC](https://discourse.julialang.org/t/revise-not-triggering-in-docker-container-with-mounted-volume/27631/3 "2019-08-17T12:18:04Z")

</div>

I am not sure whether bind mounts supports inotify, check that and see

[https://timholy.github.io/Revise.jl/stable/#If-Revise-doesn’t-work-as-expected-1](https://timholy.github.io/Revise.jl/stable/#If-Revise-doesn't-work-as-expected-1)

[https://timholy.github.io/Revise.jl/stable/config/#Polling-and-NFS-mounted-code-directories:-JULIA\_REVISE\_POLL-1](https://timholy.github.io/Revise.jl/stable/config/#Polling-and-NFS-mounted-code-directories:-JULIA_REVISE_POLL-1)

---

<div class="post-metadata">

**Author:** ![essenciary](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/essenciary/32/210469_2.png) [@essenciary](https://discourse.julialang.org/u/essenciary)\
**Post date:** [August 18, 2019, 11:30am UTC](https://discourse.julialang.org/t/revise-not-triggering-in-docker-container-with-mounted-volume/27631/4 "2019-08-18T11:30:33Z")

</div>

Thanks for the tips - I’ll try it with pooling, hopefully it will be good enough.

---

<div class="post-metadata">

**Author:** ![curtd](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/curtd/32/15868_2.png) [@curtd](https://discourse.julialang.org/u/curtd)\
**Post date:** [August 19, 2019, 3:18pm UTC](https://discourse.julialang.org/t/revise-not-triggering-in-docker-container-with-mounted-volume/27631/5 "2019-08-19T15:18:02Z")

</div>

Are you creating the appropriate Julia config file in your docker image + setting the accompanying environment variable for Revise? I develop with Julia + Revise extensively from within docker containers and some snippets from my dockerfile that enable this are:

```julia
RUN mkdir ~/.julia/config && \
    printf "atreplinit() do repl\ntry\n@eval using Revise\n@async Revise.wait_steal_repl_backend()\ncatch\nend\nend\n" >> ~/.julia/config/startup.jl 

RUN printf "using OhMyREPL; using BenchmarkTools; enable_autocomplete_brackets(false); cd(\"/projectname.jl\"); using Pkg; Pkg.activate(\".\")" >> ~/.julia/config/startup.jl

```

I also have an `init_julia.jl` script that I call when building my docker image that installs Revise, auxiliary dev packages, mounts the project I’m working on to `/projectname.jl`, and then I overwrite `/projectname.jl` with my volume mounts (all of this encoded in a `docker-compose.yml` file so I don’t have to remember how to configure everything from the command line)

---

<div class="post-metadata">

**Author:** ![essenciary](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/essenciary/32/210469_2.png) [@essenciary](https://discourse.julialang.org/u/essenciary)\
**Post date:** [August 19, 2019, 3:45pm UTC](https://discourse.julialang.org/t/revise-not-triggering-in-docker-container-with-mounted-volume/27631/6 "2019-08-19T15:45:58Z")

</div>

Thanks @curtd! No, I don’t have such a setup - I basically just tried to port my local setup (macOS) over to Docker, which amounts to installing dependencies and having `ENV["JULIA_REVISE"] = "auto"`.

That’s pretty awesome, I’ll give it a try. Docker dev is an important feature and I’d be happy to not have to resort to pooling.

---

<div class="post-metadata">

**Author:** ![curtd](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/curtd/32/15868_2.png) [@curtd](https://discourse.julialang.org/u/curtd)\
**Post date:** [August 19, 2019, 4:27pm UTC](https://discourse.julialang.org/t/revise-not-triggering-in-docker-container-with-mounted-volume/27631/7 "2019-08-19T16:27:56Z")

</div>

Good luck! I think those lines in your `DockerFile` should be sufficient to get you up + running with Revise, but if not, let me know. I’ve been meaning to write up a blog post about Docker + Julia development, but, alas, who has the time?

---

<div class="post-metadata">

**Author:** ![essenciary](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/essenciary/32/210469_2.png) [@essenciary](https://discourse.julialang.org/u/essenciary)\
**Post date:** [August 20, 2019, 2:17pm UTC](https://discourse.julialang.org/t/revise-not-triggering-in-docker-container-with-mounted-volume/27631/8 "2019-08-20T14:17:27Z")

</div>

Thank you 🙂

---

<div class="post-metadata">

**Author:** ![schlichtanders](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/schlichtanders/32/32145_2.png) [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Post date:** [October 17, 2023, 8:02am UTC](https://discourse.julialang.org/t/revise-not-triggering-in-docker-container-with-mounted-volume/27631/9 "2023-10-17T08:02:10Z")

</div>

@essenciary have you been able to get Revise working?

the recommended startup.jl does not work for me

EDIT: I just realized it works… but not for nested packages, which is weird… probably a completely different issue.

EDIT2: I may have solved it: for Revise to act accordingly, you also need to import all nested packages to the toplevel.
