Skip to content
Snippets Groups Projects
application_container.md 1.16 KiB
Newer Older
  • Learn to ignore specific revisions
  • # How to deploy application containers
    `swmodd` support deployment of application containers which support OCI image and runtime formats using CRUN.
    
    ## How to create an application container tar
    To convert an docker image to OCI application container, we need to use `skopeo` and `umoci` utilities.
    
    In below exaple [httpd](https://hub.docker.com/_/httpd) docker container is used
    - Create an empty directory in local laptop/desktop
    ```bash
    $ mkdir lcm
    $ cd lcm
    ```
    - Copy the docker image using skopeo, make sure to use correct tag as per the target architecture
    ```bash
    $ skopeo copy docker://httpd:latest oci:httpd_copy:latest
    ```
    - Unpack the downloaded image in OCI format using umoci
    ```bash
    $ sudo -i
    # cd <working_dir_path>
    # umoci unpack --image httpd_copy:latest httpd
    ```
    - Move to the directory containing config.json and rootfs and create a tar
    ```bash
    # cd httpd
    # tar cf ../httpd.tar *
    ```
    
    - Use this tar in `install_du` ubus command to deploy the application container
    
    ## Sulu application container
    An example makefile to generate sulu application container tar ball can be accessed [here](https://dev.iopsys.eu/iopsys/swmodd/-/blob/devel/examples/sulu/README.md)