# Pkg: Using ENV paths

**URL:** <https://discourse.julialang.org/t/pkg-using-env-paths/16927>\
**Category:** General Usage\
**Tags:** pkg\
**Created:** [October 29, 2018, 6:12pm UTC](https://discourse.julialang.org/t/pkg-using-env-paths/16927 "2018-10-29T18:12:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ExpandingMan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/expandingman/32/866_2.png) [@ExpandingMan](https://discourse.julialang.org/u/ExpandingMan)\
**Post date:** [October 29, 2018, 6:12pm UTC](https://discourse.julialang.org/t/pkg-using-env-paths/16927/1 "2018-10-29T18:12:05Z")

</div>

Hello all, this is related to my other post in which I’m trying desperately to get together an automated deployment of a dockerized program that pulls from a private git repo. I have pretty much given up on trying to clone from the repo in an automated way; it’s just being extremely uncooperative (probably mostly the fault of the repo).

The next best option would be simply to copy all of the packages from that repo into a docker image and be done with it. Thing is, when I use local packages, it seems to depend on the absolute path of the package. This is a problem, because once I put it into a docker that path changes. Is there currently any way to get `Pkg` to know that the path should be relative to an environment variable rather than using the full path? I realize that I could create a build script that adds them relative to the environment variables, but that seems drastically more complicated than just doing `Pkg.instantiate()`, so I’d really prefer to get it in there directly. I suppose I can always edit the manifest manually, but that would require me to maintain two copies of it which is a bit unpleasant as well.

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [October 29, 2018, 6:38pm UTC](https://discourse.julialang.org/t/pkg-using-env-paths/16927/2 "2018-10-29T18:38:49Z")

</div>

If you are using `Pkg.develop` the paths should be stored relative the `Project.toml` file, see [https://github.com/JuliaLang/Pkg.jl/pull/490](https://github.com/JuliaLang/Pkg.jl/pull/490). Maybe that is helpful for this situation?

---

<div class="post-metadata">

**Author:** ![ExpandingMan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/expandingman/32/866_2.png) [@ExpandingMan](https://discourse.julialang.org/u/ExpandingMan)\
**Post date:** [October 29, 2018, 6:55pm UTC](https://discourse.julialang.org/t/pkg-using-env-paths/16927/3 "2018-10-29T18:55:09Z")

</div>

Yup I think that’s pretty much the best I can do for now.

I wonder if it would be worth opening a Pkg issue to make using `ENV` paths a feature?

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [October 29, 2018, 9:28pm UTC](https://discourse.julialang.org/t/pkg-using-env-paths/16927/4 "2018-10-29T21:28:10Z")

</div>

I am not exactly sure I understand your setup, but can’t you just set `DEPOT_PATH`?

---

<div class="post-metadata">

**Author:** ![ExpandingMan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/expandingman/32/866_2.png) [@ExpandingMan](https://discourse.julialang.org/u/ExpandingMan)\
**Post date:** [October 30, 2018, 1:19pm UTC](https://discourse.julialang.org/t/pkg-using-env-paths/16927/5 "2018-10-30T13:19:44Z")

</div>

I guess I’m a bit confiused about what the behavior is once explicit paths are set in the `Manifest.toml`. I don’t really want to set the entire `DEPOT_PATH` since I already have a perfectly good depot containing the majority of the packages that I need, but I suppose I can add to the `LOAD_PATH`.
