No description
  • Dockerfile 100%
Find a file
2026-04-15 15:50:28 +02:00
.dockerignore Add files via upload 2024-09-16 21:07:47 +02:00
.gitignore Aktualisiere .gitignore, um temporäre Dateien und spezifische Tarball-Namen zu ignorieren 2025-01-17 21:53:40 +01:00
compose.yml Update compose.yml 2025-12-16 09:03:37 +00:00
Dockerfile Update Dockerfile 2025-12-16 08:22:53 +00:00
README.de.md Add German README 2026-04-15 15:50:28 +02:00
README.md Add English README 2026-04-15 15:50:20 +02:00

Elixir Phoenix Dev Container

A Docker-based development environment for Elixir and Phoenix projects.

Deutsch

Overview

This repository provides a ready-to-use development container with:

  • Elixir 1.19.4 / Erlang/OTP 28.3 on Debian Trixie
  • PostgreSQL 18 as database
  • Phoenix and Igniter archives pre-installed
  • Multi-stage Dockerfile with development and production builder/final stages
  • Persistent bash history across container restarts

Quick Start

  1. Clone this repository
  2. Start the development environment:
docker compose up -d
docker compose exec app bash
  1. Inside the container, create a new Phoenix project:
mix phx.new my_app --database postgres
cd my_app
mix ecto.create
mix phx.server

The application will be available at http://localhost:4000.

Structure

├── Dockerfile       # Multi-stage build (development + production)
└── compose.yml      # Development services (app + PostgreSQL)

Dockerfile Stages

Stage Purpose
package_installer Base image with build dependencies
development Interactive development with Hex, Rebar, Phoenix archives
builder Compiles assets and creates a release
final Minimal runtime image for production

Development

The compose.yml starts the app container in interactive mode (bash). This allows you to create or work on Phoenix projects inside the container while your project directory is mounted as a volume.

Database

PostgreSQL is available at localhost:5432 from the host or db:5432 from within the container network.

Production Build

To build a production release:

docker build --target final -t my-app .

References