Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@gerhard-tinned
Copy link
Contributor

Cleanup of the container setup

Issues with the current Docker setup

  • The configuration should not be part of the container image
  • The configuration should be changeable at runtime
  • It should be possible to provide a proper TLS certificate

Changes proposed in this pull request:

  • The configuration files have been removed from the container image / Dockerfile
  • initialization of the database has been removed from the image / build stage in Dockerfile
  • certificate creation has been removed from the build phase / Dockerfile
  • startup script is introduced to handle config files, database initialization and certificate creation
    • A Volume /etc/nictool/ is exposed from the container
    • The exposed volume contains the config files and the certificate

During the build of the container, NO configuration files are required. This allows for a container image containing no configuration data and can be uploaded to public container registries. The configurationa nd customisation is added while starting the container.

When the /etc/nictool/ volume is mounted into the container when started, ...

  • default config files are copied into the /etc/nictool/ directory if they do not exist already
  • The database is initialized if the database schema is not already present
  • A self-signed certificate is generated if the certificate files (cert + key) are not provided

This setup is more in line with the container philosophy and allows a more flexible update / change of settings. now changing configuration settings are simple. Change the configuration files mounted into /etc/nictool/ and restart the container. The same for the tls certificates, update them and restart the container.

ToDo:

  • So far the Documentation has not been updated. When the PR is accepted, we can work on updating the "Install NicTool with Docker" page. This setup also supports podman.
  • Currently the Container is tested with Debian but a container using Centos would be possible but is not done so far.

Checklist:

  • docs updated
  • tests updated

gerhard-tinned and others added 4 commits July 20, 2021 14:02
* Makefile.PL requirements changed from mysql to MariaDB
* Updated Dockerfile to debian 10 with mariadb libraries

Co-authored-by: Gerhard Steinbeis <[email protected]>
* Listen 443 is already present in /etc/apache2/sites-enabled/000-default.conf and causes issues (NicTool#263)
* Improved nt_export to allow MariaDB dsn (NicTool#264)

Co-authored-by: Gerhard Steinbeis <[email protected]>
@gerhard-tinned
Copy link
Contributor Author

It seems there was a git conflict with the #265 which I have fixed now as it seems.

Thanks for merging and approving the PR's so fast. :)

@msimerson msimerson merged commit bb0be41 into NicTool:master Jul 21, 2021
@msimerson msimerson mentioned this pull request Oct 3, 2025
msimerson added a commit that referenced this pull request Oct 3, 2025
* New Features
    * allow A records in in-addr.arpa #230
    * import
        * tinydns type 'S' records #246
        * bind: add CAA imports #225
    * client: add SSHFP algos 4 & 6 #303
    * export/BIND: add sort order #270
* Fixes
    * bump DB version to 2.35 on new install (was 2.27)
    * sql
        * add quotes to rank (now a MySQL keyword)
        * don't save empty strings for INTs #268
        * zone.last_publish: TIMESTAMP DEFAULT 0 -> DATETIME DEFAULT NULL #249
    * SRV: always octal_escape numbers correctly #302
    * CAA: remove any quotes added to domain name #302
    * update MANIFEST path #302
    * NAPTR: do not export/encode quotes #302
    * NAPTR: tinydns export fix #297
    * URI: tinydns export needs target escaped #296
    * export: store last ts separate #247
    * client: fix user password change #241
* Updates & Changes
    * client: add help for CAA records #219
    * client: require NAPTR replacement #221
    * client: only send cookie when secure #181
    * zr/sanity: don't allow spaces in names #238
    * import/bind: strip trailing dot from zone #248
    * import/bind: report reason on rejected records #178
    * import/tinydns:
        * append trailing . to SOA mname and rname if missing #166
        * anchor record type detection for case lowering #165
        * add imports for type 3 & 6 (IPv6 patch) #167
        * handle ascii and binary in AAAA rdata #163
        * improved TXT & SPF imports #171
    * disable SPF records by default (flip DB flag to enable) #168
    * expand UTF support to cover all UTF8 characters (requires MySQL 5.5+)
        * change table encoding from utf8 (3 bits) to utf8mb4 (4 bits) #170
    * Export/BIND: export CAA correctly #193
    * Export/BIND/dyn: fixes for ZR updates #199, #306
    * Export/Dyn: more robust handling of zone deletions, that could
      result in a new zone with the same name getting unpublished.
    * Exports: split long SPF records into 255 byte strings #173
    * Exports: run postflight after no-change export
    * session: prune pass_salt from result hash
    * session: omit sessions from deleted groups
    * test: delete tests already migrated to nt3
    * zone2nic: match domain w/o case #254
    * improved sql/create_tables.pl #190
    * docker: container updates #300, #269, #267, #266, #265, #264, #263, #262, #260
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants