uracoli-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [uracoli-devel] Blogpost about docker container


From: Axel Wachtler
Subject: Re: [uracoli-devel] Blogpost about docker container
Date: Thu, 20 Apr 2017 05:41:06 +0200
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

Hi Charles,

Am 19.04.2017 um 23:41 schrieb Charles Goyard:
One pain point I have with cross compiling and docker is how to provide
libraries. Maybe the answer is as easy as having all dependencies pulled
in a thirdparty/ (or vendor/) directory.

To get the point, you need a set of files inside the container that is required from the build process/script, right?

There are in my eyes some ways to achieve this:

1) COPY
Add a "COPY" statement to the Dockerfile and the files you need in the directory of the Dockerfile

RUN mkdir /home/uracoli/vendor_libs
COPY my_vendor_specifics /home/uracoli/vendor_libs

This adds the files at "container build time"

2) CMD

Add a "cp" command in the CMD-Command chain.

CMD \
    echo == starting uracoli-development environment == \
    && mkdir /home/uracoli/vendor_libs \
    && cp my_vendor_specifics /home/uracoli/vendor_libs \
    && /bin/bash

This adds the files add "container run time", e.g. at each time you start the container with "docker run".

If you want to share the Dockerfile with "Co-Developpers", you can
replace the "cp my_vendor_specifics /home/uracoli/vendor_libs" with
a "git clone ..." "hg clone ..." command to pull the files from a central place.

3) Map the vendor_libs directory with -v

So you can have multiple -v options in the  run command line.
(see "Adding comfort" in the Blogpost)

docker run \
       -v /usr/local/vendor_libs:/home/uracoli/vendor_libs \
       -it my-uracoli-env

Best Regards,

Axel.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]