taskManeage - Tasks: task #15389, Building a Maneaged project in...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

task #15389: Building a Maneaged project in Docker

Submitter:  Mohammad Akhlaghi <makhlaghi>
Submitted:  Sun 15 Sep 2019 03:01:29 AM UTC
   
 
Should Start On:  Sat 14 Sep 2019 11:00:00 PM UTC Should be Finished on:  Sat 14 Sep 2019 11:00:00 PM UTC
Category:  Software Priority:  5 - Normal
Status:  Ready For Test Privacy:  Public
Assigned to:  makhlaghi Percent Complete:  100%
Open/Closed:  Closed Effort:  0.00

Fri 17 Jul 2020 12:49:20 PM UTC, comment #4: 

With Commit c18c170b7f31b4, a full description for this task has been added in README.md (under the title "Building in Docker containers").

It describes all the elements of constructing the Dockerfile and also gives some tips on useful things to do with the Docker image once it is constructed.

So I am closing this task now. If deemed necessary, we can later add an option like "--in-docker" to build the Dockerfile and the resulting Docker image automatically. But that should be done in another task (if anyone asks for it!).

Mohammad Akhlaghi <makhlaghi>
Group administrator
Sun 28 Jun 2020 03:00:01 AM UTC, comment #3: 

The instructions to build a maneaged project in a Docker container have been added to the 'README.md' of the maneage-paper project under the Building in Docker containers title.

If anyone has/uses Docker, it would be great if you could try out the instructions and give your feedback. I'll merge these explanations into the core Maneage branch in a few days.

Docker will allow users to even build Maneaged projects on Microsoft Windows, or in GNU/Linux distros while on a macOS (in case there are unsolved bugs, and without the overhead of virutal machines)! As explained in the paper, its not a good archival format, but its good for situations like these, or easy moving around while developing the project temporarily (copying a few gigabytes is faster than rebuilding GCC!). It is also very commonly used with many people preferring to build projects there (this can encourage them to try out Maneage).

Just for the record I am putting a cheat-sheet of useful Docker commands here (maybe we can later add this list to 'README-hacking.md', or maintain it on another page in maneage.org):


# Build the Docker image like this from the directory that contains
# this Dockerfile:
#
#   docker build ./
#
# Tips:
#   CONCEPTS:
#     IMAGE: file(s) on the filesystem, containing the environment,
#            note that images are read-only.
#     CONTAINER: A temporary running process on the computer, using
#            the images to create an identical environment.
#
#   COMMANDS:
#   * To give a name to the image that will be created from the
#     Dockerfile in the current directory, use the '-t' option:
#          docker build -t NAME ./
#
#   * To see a list of the images or running containers on the system,
#     run these commands:
#          docker image list
#          docker container list
#
#   * Once the Image is built, you can enter it interactively with
#     (where XXXXXX) is the hash of the image (or its name). Note that
#     all changes will be lost after you exit the container with
#     'exit'.
#          docker run -it XXXXXXX
#
#   * To start the container as root (not the user specified in the
#     Dockerfile), run this command. Note that all changes will be
#     lost after you exit the container with 'exit'.
#          docker run -u 0 -it XXXXXXX
#
#   * To save the state of a running container as an image, "commit"
#     it (while it is running in another terminal). But first you need
#     its identifier (which you can get from 'docker container list'):
#          docker container list
#          docker commit XXXXXXXX NAME-OF-NEW-IMAGE
#
#   * To remove all Docker images and containers:
#          docker rm $(docker ps -a -q) && docker rmi $(docker images -q)



Mohammad Akhlaghi <makhlaghi>
Group administrator
Wed 17 Jun 2020 04:00:00 AM UTC, comment #2: 

I wrote an improved Dockerfile which is attached. I am putting it here just for the record.

(file #49282)

Mohammad Akhlaghi <makhlaghi>
Group administrator
Mon 15 Jun 2020 03:11:08 AM UTC, comment #1: 

As part of testing and finding a solution to bug #58560, I started creating a Dockerfile for easily building a Maneage-based project in a Docker image. I am uploading the Dockerfile here just for the record and will hopefully improve it soon to complete this task.

If you have Docker installed and you are in the same directory as the Dockerfile (assuming you have done its commented steps regarding the 'software' and 'data' directories), you can build the Docker image with the first command below and enter it with the second (the 'XXXXXXX' is the container ID that is printed at the end of the first command).


docker build .
docker run -it XXXXXXX


But there is still some work left for this task.

(file #49271)

Mohammad Akhlaghi <makhlaghi>
Group administrator
Sun 15 Sep 2019 03:01:29 AM UTC, original submission:  

The template is originally written to be able to easily build a project from source. But this doesn't have to be limited to the raw file system of the host.

It would be very convenient if we could have the option to build the whole project inside an automatically generated container like Docker. For example with a configure time command like this:


./project configure --in-docker=FILENAME


Everything else would be identical to a normal run of the project, except that the "build" directory would actually be within the Docker container. This container would be automatically built and updated (and thus reproducible). But an advantage of it is that it can easily be taken to another system without having to re-build the whole project from scratch (which can take time if the low-level analysis takes long), and blend in to other Docker-based solutions that are currently available.

Of course, building Docker requires root access. So we can't build Docker within the pipeline. The host has to have docker already available on their system for this option to work.

Mohammad Akhlaghi <makhlaghi>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #49282:  Dockerfile added by makhlaghi (3KiB - application/octet-stream)
file #49271:  Dockerfile added by makhlaghi (2KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by makhlaghi (Submitted the item)
  • -email is unavailable- added by makhlaghi
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 11 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-07-17 makhlaghi Percent Complete90% 100%
        Open/ClosedOpen Closed
        SummaryBuilding project in containers like Docker Building a Maneaged project in Docker
    2020-06-28 makhlaghi StatusPostponed Ready For Test
        Percent Complete30% 90%
        Assigned toNone makhlaghi
    2020-06-17 makhlaghi Attached File- Added Dockerfile, #49282
        Percent Complete20% 30%
    2020-06-15 makhlaghi Attached File- Added Dockerfile, #49271
        Percent Complete0% 20%
    2019-09-15 makhlaghi Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code