chore(): Adds a build container pipeline and a working Dockerfile
Some checks failed
build-container / docker (push) Failing after 3m19s

This commit is contained in:
Elia el Lazkani 2024-03-30 22:19:26 +01:00
parent 7eafc5134e
commit 2acba51aaa
2 changed files with 46 additions and 0 deletions

View file

@ -0,0 +1,33 @@
name: build-container
on:
push:
branches:
- 'main'
jobs:
docker:
runs-on: pi
container:
image: python:3.12.2-slim-bookworm
steps:
- name: Install dependencies
id: dependencies
run: |
apt-get update
apt-get install -y -qq nodejs git
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: false
tags: scm.project42.io/elia/ansible-actions-container:latest

13
Dockerfile Normal file
View file

@ -0,0 +1,13 @@
FROM python:3.12.2-slim-bookworm
RUN apt-get update && \
apt-get install -y -qq nodejs git && \
apt-get clean && \
useradd -m --uid 1010 --shell /bin/bash ansible
USER 1010
RUN pip install --user ansible && \
echo 'export PATH="$HOME/.local/bin:$PATH"' >> $HOME/.bashrc
ENTRYPOINT ["/bin/bash"]