my_app

Version, currently main branch1 version
  • main branchlatestMar 17, 2026

github.com/compumike/crystal-docker-quickstart

A project template for quickly working with the Crystal programming language in a Docker container, no installation needed.

22 stars
0 dependents
License: MIT

Installation

# Add this to your shard.yml
dependencies:
  my_app:
    github: compumike/crystal-docker-quickstart
    branch: main

main is a branch, not a release, so this tracks it rather than pinning a version.

Then run:

shards install

shard.yml

Crystal
no constraint declared

Dependencies

Runtime Dependencies

README

crystal-docker-quickstart

crystal-docker-quickstart provides a project template for quickly working with the Crystal programming language in a container, with no installation necessary.

Usage

  1. (Fork and/or) clone this repository, and give it a name for your project: git clone https://github.com/compumike/crystal-docker-quickstart.git my_app
  2. cd my_app
  3. Run ./d_dev to open a bash shell with a Docker container containing this directorye mounted in /app/ (see source in /app/src/, unit tests in /app/spec/, and compiled output in /app/out/).

Within the Docker container, you may run:

    # To run unit tests:
    make spec

    # To rebuild your compiled binary, which lives in /app/out/my_app
    make

    # To rebuild the binary, and run it:
    make && out/my_app

You may edit your source code from another terminal session or your favorite IDE. (The d_dev script mounts this directory into the container.)

Good luck and enjoy! :)

Next Steps

You may wish to edit some configuration within Dockerfile, d_dev, or Makefile, for example to expose TCP ports, enable compiler release optimizations, or rename your binary to something other than my_app.

If you'd like to incorporate a dependency, known as a "Shard" in the crystal world, first edit shard.yml, and then run shards install within the Docker container.

Resources

Supported By

This work is supported by: