build.rst 1.86 KB
Newer Older
BorjaEst's avatar
BorjaEst committed
1
2
3
Build
===================

4
5
6
Download the code from the o3skim_ repository at the **Build machine**.

For example, using git_:
BorjaEst's avatar
BorjaEst committed
7
8
9
10
11
12
13

.. code-block:: bash

    $ git clone git@git.scc.kit.edu:synergy.o3as/o3skim.git
    Cloning into 'o3skim'...
    ...

14
15
16
.. _o3skim: https://git.scc.kit.edu/synergy.o3as/o3skim
.. _git: https://git-scm.com/

BorjaEst's avatar
BorjaEst committed
17

18
19
20
Build the container image at the **Build machine**.

For example, using docker_:
BorjaEst's avatar
BorjaEst committed
21
22
23
24
25
26
27
28

.. code-block:: bash

    $ docker build --tag o3skim .
    ...
    Successfully built 69587025a70a
    Successfully tagged o3skim:latest

29
30
.. _docker: https://docs.docker.com/engine/reference/commandline/build

BorjaEst's avatar
BorjaEst committed
31

BorjaEst's avatar
BorjaEst committed
32
If the build process succeeded, then you should see the image name on the container images list:
BorjaEst's avatar
BorjaEst committed
33
34
35
36
37
38
39
40

.. code-block:: bash

    $ docker images
    REPOSITORY                         TAG                 IMAGE ID            CREATED              SIZE
    o3skim                             latest              69587025a70a        xx seconds ago      557MB
    ...

41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66

To use your new generated image on the **Runtime machine**, the easiest way is to 
push to a dockerhub repository. For example, with docker_:

.. code-block:: bash

    $ docker push <repository>/o3skim:<tag>
    The push refers to repository [docker.io/........./o3skim]
    ...
    7e84795fccac: Preparing 
    7e84795fccac: Layer already exists 
    ffaeb20d9e23: Layer already exists 
    4cdd6a90e552: Layer already exists 
    3e0762bebc71: Layer already exists 
    1e441fe06d90: Layer already exists 
    98ff2784e9f5: Layer already exists 
    2b99e2403063: Layer already exists 
    d0f104dc0a1f: Layer already exists 
    ...: digest: sha256:...................... size: 2004

If you do not have internet access from the **Build machine** or **Runtime machine**
it is also possible to use `docker save`_ to export your images.


.. _`docker save`: https://docs.docker.com/engine/reference/commandline/save/