diff --git a/README.adoc b/README.adoc index ad17a42..0bc1866 100644 --- a/README.adoc +++ b/README.adoc @@ -41,79 +41,103 @@ Both containers are tailored for Tebako packaging, featuring preinstalled Ruby environments versions 3.2.5 and 3.3.4. -== Packaging with the Tebako containers +== Using the Tebako containers + +=== General There are two primary methods for packaging with Tebako: from inside the container and from outside using Docker commands. - -== Prerequisites +=== Prerequisites * Docker installed on your machine. * A Ruby application ready for packaging. -== Packaging from Inside the Container + +=== Package using an ephemeral container + +You can also package your application from outside the container by running a +single Docker command. + +This command mounts your workspace into the container and runs the +`tebako press` command, specifying: + +* application root +* entry point +* output location +* Ruby version + +[source,sh] +---- +$ docker run -v :/mnt/w \ + -t ghcr.io/tamatebako/tebako-${{ container_tag }}:latest \ + tebako press +---- + +.Packaging `fontist` with an ephemeral container +[example] +==== +A Ruby application called `fontist` inside `fontist/` under the current +directory, can be packaged into `./fontist-package` using the following command. + +[source,sh] +---- +docker run -v $PWD:/mnt/w \ + -t ghcr.io/tamatebako/tebako-ubuntu-20.04:latest \ + tebako press --root=/mnt/w/fontist --entry-point=fontist --output=/mnt/w/fontist-package --Ruby=3.2.5 +---- +==== + +=== Package using a persistent container To package your application from inside the Tebako container, follow these steps: . Pull the Tebako container image: - ++ [source,sh] ---- -docker pull ghcr.io/tamatebako/tebako-:latest +$ docker pull ghcr.io/tamatebako/tebako-:latest ---- + -Replace `` with the desired tag (e.g., `ubuntu-20.04` or `alpine-3.17`). +Replace `` with the desired container tag (e.g., `ubuntu-20.04` or `alpine-3.17`). . Start and enter the container interactively: + [source,sh] ---- -docker run -it --rm -v :/mnt/w ghcr.io/tamatebako/tebako-:latest bash +$ docker run -it --rm -v :/mnt/w ghcr.io/tamatebako/tebako-:latest bash ---- + -Again, replace `` with the appropriate tag and - with the path to your application folder. +Replace `` with the appropriate tag and `` +with the path to your application folder. . Once inside, run the `tebako press` command: + [source,sh] ---- -tebako press +$ tebako press ---- -For example, assuming that you have a Ruby application in the `fontist` folder -of the current folder, you can package it to `./fontist-package` using the -following command. + +.Packaging `fontist` with a persistent container +[example] +==== +A Ruby application called `fontist` inside `fontist/` under the current +directory, can be packaged into `./fontist-package` using the following command. [source,sh] ---- -docker run -it --rm -v $PWD:/mnt/w ghcr.io/tamatebako/tebako-:latest bash -# After entering the container: -tebako press --root=/mnt/w/fontist --entry-point=fontist --output=/mnt/w/fontist-package --Ruby=3.2.5 ----- +# Starting a persistent container +$ docker run -it --rm -v $PWD:/mnt/w ghcr.io/tamatebako/tebako-:latest bash +# Run this after entering the container +$ tebako press --root=/mnt/w/fontist --entry-point=fontist --output=/mnt/w/fontist-package --Ruby=3.2.5 +---- +==== -== Packaging from Outside the Container -You can also package your application from outside the container by running a single Docker command. +== License -This command mounts your workspace into the container and runs the -`tebako press` command, specifying the application root, entry point, output -location, and Ruby version. +Copyright Ribose. All rights reserved. -[source,sh] ----- -docker run -v :/mnt/w \ - -t ghcr.io/tamatebako/tebako-${{ container_tag }}:latest \ - tebako press ----- -+ -For example, assuming that you have a Ruby application in the `fontist` folder of the current folder, you can package it to `./fontist-package` using the following command: -+ -[source,sh] ----- -docker run -v $PWD:/mnt/w \ - -t ghcr.io/tamatebako/tebako-ubuntu-20.04:latest \ - tebako press --root=/mnt/w/fontist --entry-point=fontist --output=/mnt/w/fontist-package --Ruby=3.2.5 ----- +This work is licensed under the 2-Clause BSD License.