You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@guacamole.apache.org by Benchu Yao <ya...@gmail.com> on 2020/07/02 12:06:42 UTC
How to use local maven repository when building image using dockerfile?
Dockerfile use official maven image for the build, due to network problems,
every time I need to download the maven dependency package for a long time.
Can I use the local maven repository to cache java dependency packages,
what should I do?
Thanks,
Yao Benchu
Re: How to use local maven repository when building image using
dockerfile?
Posted by carl harris <ce...@gmail.com>.
Of course, another option would be to pull the container image from hub.docker.com <http://hub.docker.com/> instead of trying to build it yourself. That would make use of Docker's layer cache to avoid re-downloading layers that haven't changed.
docker pull guacamole/guacamole
docker pull guacamole/guacd
I realize that for some, that's not an option because they either want a custom build or they have administrative prohibitions of one kind or another. Just wanted to put it out there...
carl
Re: How to use local maven repository when building image using
dockerfile?
Posted by carl harris <ce...@gmail.com>.
It's true that Maven does keep a local repository, but when building the Docker image, that repository is inside of the build container, so it starts out completely empty for every build.
I don't know of a way to tell Docker to bind-mount a portion of the local filesystem in a way that would make it available as the guacamole container image is built, but I think that's really the question to be answered.
carl
> On Jul 2, 2020, at 8:43 AM, Nick Couchman <vn...@apache.org> wrote:
>
> On Thu, Jul 2, 2020 at 8:07 AM Benchu Yao <ya...@gmail.com> wrote:
>
>> Dockerfile use official maven image for the build, due to network problems,
>> every time I need to download the maven dependency package for a long time.
>> Can I use the local maven repository to cache java dependency packages,
>> what should I do?
>>
>>
> Maven automatically caches everything locally, so you shouldn't need to
> build this out manually. If you have further questions about Maven you
> might try the Maven support resources - you're likely to find better help
> for it, there:
>
> http://maven.apache.org/mailing-lists.html
>
> -Nick
Re: How to use local maven repository when building image using dockerfile?
Posted by Nick Couchman <vn...@apache.org>.
On Thu, Jul 2, 2020 at 8:07 AM Benchu Yao <ya...@gmail.com> wrote:
> Dockerfile use official maven image for the build, due to network problems,
> every time I need to download the maven dependency package for a long time.
> Can I use the local maven repository to cache java dependency packages,
> what should I do?
>
>
Maven automatically caches everything locally, so you shouldn't need to
build this out manually. If you have further questions about Maven you
might try the Maven support resources - you're likely to find better help
for it, there:
http://maven.apache.org/mailing-lists.html
-Nick