Give the example here which has an attempt at setting the hostname to
foo.bar.baz
for the duration of the build,
#!/bin/bash
ctr=$(buildah from alpine:3)
buildah run --hostname 'foo.bar.baz' $ctr /bin/sh <<-'EOF'
echo "/usr/bin/hostname returns [$(hostname)]";
EOF
I get the following output,
/usr/bin/hostname returns [myHostname]
I was expecting hostname
to return foo.bar.baz
.
I'm using Debian Testing's buildah package 1.15.2-1.
❯ buildah version
Version: 1.15.2
Go Version: go1.14.7
Image Spec: 1.0.1
Runtime Spec: 1.0.2-dev
CNI Spec: 0.4.0
libcni Version:
image Version: 5.5.2
Git Commit:
Built: Wed Dec 31 18:00:00 1969
OS/Arch: linux/amd64
But I've also tested it on 1.17,
❯ buildah version
Version: 1.17.0
Go Version: go1.15.2
Image Spec: 1.0.1-dev
Runtime Spec: 1.0.2-dev
CNI Spec: 0.4.0
libcni Version:
image Version: 5.7.0
Git Commit:
Built: Wed Dec 31 18:00:00 1969
OS/Arch: linux/amd64
Asked by Evan Carroll
(34663 rep)
Nov 12, 2020, 08:38 AM
Last activity: Nov 17, 2020, 12:25 AM
Last activity: Nov 17, 2020, 12:25 AM