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 – Built for High-Performance Time Series Workloads
InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  1. 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/

  2. InfluxDB

    InfluxDB – Built for High-Performance Time Series Workloads. InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.

    InfluxDB logo
  3. 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.

  4. 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

Did you know that Go is
the 4th most popular programming language
based on number of references?