docker -> podman

This commit is contained in:
Felipe M 2020-12-26 20:42:26 +01:00
parent 53c16ab50e
commit 7f8b318b9a
3 changed files with 21 additions and 17 deletions

View File

@ -1,11 +1,14 @@
FROM archlinux/base:latest
FROM docker.io/archlinux/base:latest
LABEL MAINTAINER "Felipe Martin <me@fmartingr.com>"
COPY requirements.txt /tmp/requirements.txt
RUN pacman -Syu --noconfirm python python-pip base-devel && \
pip install -r /tmp/requirements.txt && \
useradd builder
RUN pacman -Syyu --noconfirm python python-pip base-devel
RUN pip install -r /tmp/requirements.txt
RUN useradd builder -u 1000
RUN chown -R 1000:1000 /tmp
RUN echo "builder ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/builder
RUN echo "nameserver 9.9.9.9" > /etc/resolv.conf
USER builder

View File

@ -1,13 +0,0 @@
#!/bin/bash -xe
NAME=$1
docker build -t aur-package-builder .
clear
docker run -it --rm \
-e PACKAGE_NAME="$NAME" \
-v "$PWD/$NAME:/tmp/$NAME" \
-v "$PWD/templates:/tmp/templates" \
aur-package-builder

14
podman-build.sh Executable file
View File

@ -0,0 +1,14 @@
#!/bin/bash -xe
NAME=$1
podman build -t aur-package-builder .
clear
podman run -it --rm \
-e PACKAGE_NAME="$NAME" \
-v "$PWD/$NAME:/tmp/$NAME:rw" \
-v "$PWD/templates:/tmp/templates" \
--userns=keep-id --user=$(id -ur):$(id -gr) \
aur-package-builder