Auto build and run a React app within a Docker container without a Dockerfile
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Rust 100.0%
2 1 2

Clone this repository

https://tangled.org/kaushikc.org/autopack https://tangled.org/did:plc:lvkhxfkdwqgwrpdek3h3q2gc/autopack
git@git.kaushikc.org:kaushikc.org/autopack git@git.kaushikc.org:did:plc:lvkhxfkdwqgwrpdek3h3q2gc/autopack

For self-hosted knots, clone URLs may differ based on your setup.

Download tar.gz
README.md

autopack#

About#

autopack creates Docker/OCI images of a React web application built using Create React App (CRA) tool. All that without any Dockerfile or any Docker mastery. It is available as a command line application (CLI) that run across Windows, Linux, and macOS.

For motivation and other details, check out the autopack RFC

Installation#

Autopack is distributed via the pre-built binaries that one could install from the Releases page. Download, unzip, move the unzipped executable to have it available in your terminal's path, and then use the auto-pack command from your React project root folder.

Pre-requisties#

autopack relies on Docker to run the built OCI images. So a relevant Docker runtime is required to be installed.

Currently, autopack only works for React projects built using CRA. It requires at least the build command to be present in the package.json.

Usage#

> auto-pack --help
autopack 0.1.0
Auto Pack CLI

USAGE:
    auto-pack <SUBCOMMAND>

OPTIONS:
    -h, --help       Print help information
    -V, --version    Print version information

SUBCOMMANDS:
    build    Build auto-pack
    help     Print this message or the help of the given subcommand(s)
    init     Initializes auto-pack
    run      Runs auto-pack

Initialization#

autopack initializes itself on the first run of this command. It will also download and install the required underlying tools.

Build#

The build command generates the docker image.

Run#

Run the container

Build from source#

autopack is a Rust application. Follow the process of quickly setup the Rust development environment as mentioned here. And then

# build
$ cargo build
# run
$ cargo run init