Initial commit
This commit is contained in:
commit
e65b334271
4 changed files with 76 additions and 0 deletions
8
Containerfile.ci
Normal file
8
Containerfile.ci
Normal file
|
@ -0,0 +1,8 @@
|
|||
# Build: podman build -t localhost/python-ci -f Containerfile.ci
|
||||
FROM localhost/trixie_python
|
||||
|
||||
RUN apt-get -y --no-install-recommends install nodejs git python3-pytest python3-httpx buildah podman && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/listsd/* && \
|
||||
rm -rf /root/.cache
|
||||
|
23
Containerfile.trixie_python
Normal file
23
Containerfile.trixie_python
Normal file
|
@ -0,0 +1,23 @@
|
|||
# Build: podman build -t trixie_python -f Containerfile.trixie_python
|
||||
|
||||
FROM debian:trixie-slim
|
||||
|
||||
RUN <<EOT
|
||||
apt-get update -qy
|
||||
apt-get install -qyy \
|
||||
-o APT::Install-Recommends=false \
|
||||
-o APT::Install-Suggests=false \
|
||||
ca-certificates \
|
||||
python-is-python3
|
||||
apt-get clean
|
||||
EOT
|
||||
|
||||
COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv
|
||||
|
||||
ENV UV_LINK_MODE=copy \
|
||||
UV_COMPILE_BYTECODE=1 \
|
||||
UV_PYTHON_DOWNLOADS=never \
|
||||
#UV_PYTHON=python3.12 \
|
||||
UV_PROJECT_ENVIRONMENT=/app \
|
||||
PYTHONPATH=/app/lib/python3.12/site-packages \
|
||||
PATH=/app/bin:$PATH
|
2
README.md
Normal file
2
README.md
Normal file
|
@ -0,0 +1,2 @@
|
|||
# Common containers for my developments
|
||||
|
43
build_generic_images.yaml
Normal file
43
build_generic_images.yaml
Normal file
|
@ -0,0 +1,43 @@
|
|||
- name: Build generic containers - base python and ci
|
||||
hosts: localhost
|
||||
gather_facts: false
|
||||
vars:
|
||||
force: false
|
||||
force_rm: false
|
||||
cache: false
|
||||
registry: tiptop:5000
|
||||
|
||||
tasks:
|
||||
- name: Using the variables
|
||||
ansible.builtin.debug:
|
||||
var: force_rm
|
||||
|
||||
- name: Build the base image
|
||||
containers.podman.podman_image:
|
||||
name: trixie_python
|
||||
state: build
|
||||
path: "{{ playbook_dir }}"
|
||||
tag: 1
|
||||
build:
|
||||
format: oci
|
||||
force_rm: "{{ force_rm }}"
|
||||
cache: "{{ cache }}"
|
||||
file: Containerfile.trixie_python
|
||||
push: true
|
||||
push_args:
|
||||
dest: "{{ registry }}/trixie_python"
|
||||
|
||||
- name: Build the image for ci
|
||||
containers.podman.podman_image:
|
||||
name: python-ci
|
||||
state: build
|
||||
path: "{{ playbook_dir }}"
|
||||
tag: 1
|
||||
build:
|
||||
format: oci
|
||||
force_rm: "{{ force_rm }}"
|
||||
cache: "{{ cache }}"
|
||||
file: Containerfile.ci
|
||||
push: true
|
||||
push_args:
|
||||
dest: "{{ registry }}/python-ci"
|
Loading…
Add table
Add a link
Reference in a new issue