Browse Source

add dict container

Andrew Dolgov 5 days ago
parent
commit
50c128aa21
3 changed files with 62 additions and 0 deletions
  1. 9 0
      dict/Dockerfile
  2. 43 0
      dict/dictd.conf
  3. 10 0
      docker-compose.yml

+ 9 - 0
dict/Dockerfile

@@ -0,0 +1,9 @@
+FROM debian:buster-slim
+
+RUN apt-get update && apt-get install -y dictd mueller7-dict
+
+COPY dictd.conf /etc/dictd/dictd.conf
+
+EXPOSE 2628
+
+ENTRYPOINT /usr/sbin/dictd -d nodetach

+ 43 - 0
dict/dictd.conf

@@ -0,0 +1,43 @@
+# /etc/dictd/dictd.conf
+
+# This is the configuration file for /usr/sbin/dictd.  The access
+# specification included in this file allows access only from the
+# localhost.  If this machine is acting as a server for a network you
+# will probably want to add additional access specifications in this
+# file.  See the dictd manpage - man dictd.
+
+# A sample database section is generated automatically upon
+# installation or removal of the dictd package or any dictionary
+# database package.  Replace the ``include /var/lib/dictd/db.list''
+# line below if you wish to provide a custom database section.
+# Customization may also be achieved via the optional dictdconfig
+# order override file /etc/dictd/dictd.order.  See the dictdconfig
+# manpage - man dictdconfig.
+
+# Older dictionary database packages did not automatically
+# invoke /usr/sbin/dictdconfig upon installation and removal,
+# so you may need to do so manually.
+
+# Site section here:
+
+global {
+#listen_to 127.0.0.1
+# bind to local interfacea only
+}
+
+# Access section here:
+
+access {
+allow *
+allow localhost
+allow 127.0.0.1
+# this allows access only from local host
+allow inetd
+# this allows access from inetd server
+}
+
+# Database section here:
+
+include /var/lib/dictd/db.list
+
+# User section here:

+ 10 - 0
docker-compose.yml

@@ -3,6 +3,16 @@ version: '3'
 # please don't use quote (') or (") symbols in variables
 
 services:
+  # optional dictionary server (add other dictionaries via Dockerfile)
+  # define('DICT_SERVER', 'dict');
+  # comment it out if you don't need it
+
+  dict:
+    build:
+      context:
+        ./dict
+    restart: unless-stopped
+
   app:
     build: 
       context: