Using ARG in a Dockerfile – beware the gotcha

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • json5

    JSON5 — JSON for Humans

  • That is what you get when people reinvent the wheel and lifetimes/ scopes are implicit. Docker could've used something like JSON5 [0] for their configuration format to make the lifetimes explicit. Another time when easy won over simple. [1]

    [0] https://json5.org/

  • buildah

    A tool that facilitates building OCI images.

  • I wish we would rather get rid of Dockerfile in favor of something like buildah does:

    https://github.com/containers/buildah/blob/main/examples/lig...

    Since Dockerfile is a rather limited and (IMHO) poorly executed re-implementation of a shell script, why not rather use shell directly? Not even bash with coreutils is necessary: even posix sh with busybox can do far more than Dockerfile, and you can use something else (like Python) and take it very far indeed.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • script

    Making it easy to write shell-like scripts in Go

  • That's why I plan on migrating all my shell scripts to Golang programs f.ex. using https://github.com/bitfield/script -- it already has a number of simulations of shell commands and I'd contribute others if I had the time.

    sh / bash / zsh scripts are just fragile and that's the inconvenient truth. People who devised the shell interpreters had good intentions but ultimately their creations grew to a scope 1000x bigger than they intended, hence all the "do X but if Y flag is set then do Z... unless flag A is also set in which case do Y and part of Z".

    It's horrendous and I seriously don't get what's so difficult in just coding these scripts in a programming language that provides single statically linked binaries (like Golang) and just distribute it with your images -- or run them in CI/CD and have init containers and never include them in the images in the first place.

    Inertia, of course. But I'll be actively working against it until I retire.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Dasel - jq for yaml json and toml

    2 projects | dev.to | 16 Apr 2023
  • Why a world needs an UNIX-style image collection manager?

    3 projects | /r/linux | 19 Mar 2023
  • How to grep a specific field from curl output

    1 project | /r/commandline | 14 Sep 2022
  • Implementing a simple jq clone in Go, and basics of Go memory profiling

    2 projects | /r/golang | 11 Jul 2022
  • opsort.vim: operator that sorts lines

    2 projects | /r/vim | 8 Jul 2022