Giter Club home page Giter Club logo

container_chrony_f36's Introduction

Podman - Minimal Chrony service

Build from a Fedora 36 image with only chrony service implemented as time server. The goal is to reduce surface attack with only few binary tools onboarded, use chrony user to lauch the service and cost size reduced as much as possible.

image

Prerequisites

You need to build the image on a machine with podman 3.3.1 installed

What the script does ?

  • Pull a fedora 36 container as helper
  • Mount a directory to build the chrony image
  • use fedora container to build the chony service inside the mounted directory
  • archive the mounted directory in a layer.tar.xz
  • use the new layer as sysroot directory to build the final image
  • create 2 tmpfs volume to secure the chrony service
  • Launch a test container with the local chrony.conf as time source in the most secure way
  • remove sysroot content

Installation

You can clone the repository or download files

git clone https://github.com/vpolaris/container_chrony_f36.git
cd container_chrony_f36 && chmod u+x install_chronyd.sh 
sudo ./install_chronyd.sh

To schedule the default service use the following command

podman run -d --read-only  \
    --name chrony \
    --publish 123:123/udp \
    --health-cmd 'CMD-SHELL chronyc tracking || exit 1' \
    --health-interval 15m \
    --health-start-period 2m \
    --restart on-failure \
    --volume /etc/chrony.conf:/etc/chrony.conf:ro \
    --volume run_chrony:/run/chrony:Z \
    --volume var_chrony:/var/lib/chrony:rw \
    -t f36:chony

Check

Launch the health check

podman healthcheck run chrony

image

sources

This is the sites where I found the materials

container_chrony_f36's People

Contributors

vpolaris avatar

Watchers

 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.