GithubHelp home page GithubHelp logo

yehy4 / docker_tang Goto Github PK

View Code? Open in Web Editor NEW

This project forked from padhi-homelab/docker_tang

0.0 0.0 0.0 59 KB

A multiarch tang Docker image, based on Alpine Linux.

License: MIT License

Shell 22.57% Dockerfile 77.43%

docker_tang's Introduction

docker_tang

A multiarch tang Docker image, based on Alpine Linux.

386 amd64 arm/v6 arm/v7 arm64 ppc64le s390x
✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️

Usage

docker run -p 1234:8080 -it padhihomelab/tang

Runs tang server on port 1234.

You might also want to use:

  • the --detach to run the container in background
  • the --rm to cleanup the container filesystem after docker exits
  • a docker compose workflow instead (see: services/tang)

IPv4 vs IPv6

By default, the tang server only listens on IPv4. You may, however, also listen on IPv6 by creating a container with ENABLE_IPv6=1 set:

docker run -e ENABLE_IPv6=1 ...

You may even disable listening on IPv4 entirely, and only listen on IPv6 instead:

docker run -e ENABLE_IPv4=0 -e ENABLE_IPv6=1 ...

Persistent Database

To persist tang's database beyond the lifetime of a container, you could bind mount a host filesystem directory at /db:

docker run -v /path/to/tang/db:/db \
           -p 1234:8080 \
           -it padhihomelab/tang

This container drops root privilege at startup, and runs tang as an unprivileged user with DOCKER_UID id. So, the files in /path/to/tang/db that are written by tang are owned by the $DOCKER_UID user id within the container.
For your host system user to be able to access them, you may override the DOCKER_UID variable when starting the container:

docker run -v /path/to/tang/db:/db \
           -e DOCKER_UID=$(id -u) \
           -p 1234:8080 \
           -it padhihomelab/tang

For more information on this topic, please see the alpine-base image documentation: Do I ever need to override the UID, GID etc.? Why are these variables exposed?

docker_tang's People

Contributors

dependabot[bot] avatar saswatpadhi avatar yehy4 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.