summaryrefslogtreecommitdiffstats
path: root/build/buildah-ccpi.sh
blob: 1bc6b103fbbfbb893be0942d3d0f910e9adfefea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#! /usr/bin/env bash

set -o errexit

container=$(buildah from astra:latest)

buildah config --env LANG="C.UTF-8" --env LC_ALL="C.UTF-8" --env TERM="xterm" --env CIL_VERSION=19.10 --env HOME=/ccpi/data $container
buildah config --port 2222 $container

buildah run $container bash /root/setup/repos.sh "all"

buildah run $container sh -c "echo '$(id -ng):x:$(id -g):' >> /etc/group"
#buildah run $container sh -c "echo '$(id -nu):x:$(id -u):$(id -g):$(id -nu):/ccpi/data:/bin/bash' >> /etc/passwd"
buildah run $container sh -c "echo '$(id -nu):x:0:0:$(id -nu):/ccpi/data:/bin/bash' >> /etc/passwd"

buildah run $container sh -c 'service ssh start'
buildah run $container sh -c "echo '$(id -nu):test' | chpasswd"
buildah commit --format docker $container ccpi:latest

echo $container