Git Product home page Git Product logo

firebird-docker's Introduction

firebird-docker

Docker images for Firebird Database.

Quick reference

Supported tags

ghcr.io/fdcastel/firebird Dockerfile OS Last modified
5, 5-bookworm, bookworm, latest Dockerfile Debian 12.5 2024-05-02
5-jammy, jammy Dockerfile Ubuntu 22.04 2024-05-02
4, 4-bookworm Dockerfile Debian 12.5 2024-05-02
4-jammy Dockerfile Ubuntu 22.04 2024-05-02
3, 3-bookworm Dockerfile Debian 12.5 2024-05-02
3-jammy Dockerfile Ubuntu 22.04 2024-05-02

How to use this image

Image defaults:

  • EXPOSE 3050/tcp
  • VOLUME /run/firebird/data

Start a Firebird server instance

docker run \
    -e FIREBIRD_ROOT_PASSWORD=************ \
    -e FIREBIRD_USER=alice \
    -e FIREBIRD_PASSWORD=************ \
    -e FIREBIRD_DATABASE=mirror.fdb \
    -e FIREBIRD_DATABASE_DEFAULT_CHARSET=UTF8 \
    -v ./data:/run/firebird/data
    --detach ghcr.io/fdcastel/firebird
services:
  firebird:
    image: ghcr.io/fdcastel/firebird
    restart: always
    environment:
      - FIREBIRD_ROOT_PASSWORD=************
      - FIREBIRD_USER=alice
      - FIREBIRD_PASSWORD=************
      - FIREBIRD_DATABASE=mirror.fdb
      - FIREBIRD_DATABASE_DEFAULT_CHARSET=UTF8
    volumes:
      - ./data:/run/firebird/data

Connect to an existing instance using isql

docker run -it --rm ghcr.io/fdcastel/firebird isql -u SYSDBA -p ************ SERVER:/path/to/file.fdb

Environment variables

The following environment variables can be used to customize the container.

FIREBIRD_ROOT_PASSWORD

  • alternate name: ISC_PASSWORD

If present sets the password for SYSDBA user.

If not present a random password will be generated and stored into /opt/firebird/SYSDBA.password.

FIREBIRD_USER

Creates an user in Firebird security database.

You must inform a password in FIREBIRD_PASSWORD variable. Otherwise the container initialization will fail.

FIREBIRD_DATABASE

Creates a new database. Ignored if the database already exists.

Database location is /run/firebird/data. Absolute paths (outside this folder) are allowed.

You may use FIREBIRD_DATABASE_PAGE_SIZE to set the database page size. And FIREBIRD_DATABASE_DEFAULT_CHARSET to set the default character set.

FIREBIRD_USE_LEGACY_AUTH

Enables legacy authentication (not recommended).

FIREBIRD_CONF_*

Any variable starting with FIREBIRD_CONF_ can be used to set values in Firebird configuration file (firebird.conf).

E.g. You can use FIREBIRD_CONF_DataTypeCompatibility=3.0 to set the value of key DataTypeCompatibility to 3.0 in firebird.conf.

Please note that keys are case sensitive. And any key not present in firebird.conf will be ignored.

*_FILE

Any of the previously listed environment variables may be loaded from file by appending the _FILE suffix to the variable name.

E.g. FIREBIRD_PASSWORD_FILE=/run/secrets/firebird-passwd will load FIREBIRD_PASSWORD with the content from /run/secrets/firebird-passwd file.

Note that both the original variable and its _FILE variant are mutually exclusive. Trying to use both will cause the container initialization to fail.

Initializing the database contents

When creating a new database with FIREBIRD_DATABASE environment variable you can initialize it running one or more shell or SQL scripts.

Any file with extensions .sh, .sql, .sql.gz, .sql.xz and .sql.zst found in /docker-entrypoint-initdb.d/ will be executed in alphabetical order. .sh files without file execute permission (+x) will be sourced rather than executed.

IMPORTANT: Scripts will only run if you start the container with a data directory that is empty. Any pre-existing database will be left untouched on container startup.

Development notes

Prerequisites

Build

To generate the source files and build each image from assets.json configuration file, run:

Invoke-Build

You can then check all created images with:

docker image ls ghcr.io/fdcastel/firebird

Tests

To run the test suite for each image, use:

Invoke-Build Test

firebird-docker's People

Contributors

fdcastel avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.