Skip to content

Instantly share code, notes, and snippets.

View Luap99's full-sized avatar

Paul Holzinger Luap99

  • Germany
  • 01:01 (UTC +02:00)
View GitHub Profile
@Luap99
Luap99 / Containerfile
Last active April 29, 2025 17:53
coreos build regression: missing resolv.conf
FROM quay.io/fedora/fedora-coreos:stable
# Disable the systemd resolver, the unit cannot be disabled/ or masked
# https://fedoraproject.org/wiki/Changes/systemd-resolved#Fully_opting_out_of_systemd-resolved_use
# https://github.com/containers/podman-machine-os/issues/18
# We have to remove /etc/resolv.conf because that is a symlink to the systemd resolv dir which
# means NetworkManager will not populate it otherwise. To do that we use --network=none so podman
# does not mount over it and we can remove and create a real inode on the rootfs.
RUN --network=none mkdir -p /etc/systemd/system-preset && \
echo "disable systemd-resolved.service" >/etc/systemd/system-preset/20-systemd-resolved-disable.preset && \
rm -f /etc/resolv.conf && touch /etc/resolv.conf
@Luap99
Luap99 / main.go
Created August 31, 2020 20:47
Cobra completion test
package main
import (
"fmt"
"os"
"path/filepath"
"strings"
"github.com/spf13/cobra"
)