chore(): Adds a build container pipeline and a working Dockerfile
Some checks failed
build-container / docker (push) Failing after 3m19s
Some checks failed
build-container / docker (push) Failing after 3m19s
This commit is contained in:
parent
7eafc5134e
commit
2acba51aaa
2 changed files with 46 additions and 0 deletions
33
.forgejo/workflows/build-container.yml
Normal file
33
.forgejo/workflows/build-container.yml
Normal 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
13
Dockerfile
Normal 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"]
|
Loading…
Reference in a new issue