docker-compose: integrate dev container
Integrate the dev container into docker compose with the aim of making test-case generation work as well as composer-cli. This also makes docker-compose self contained, and no setup or configuration is required beyond running `docker compose up --build`.
This commit is contained in:
parent
bbbbe32b10
commit
9b89df57b6
6 changed files with 109 additions and 72 deletions
|
|
@ -1,2 +0,0 @@
|
|||
COMPOSE_PROJECT_NAME=osbuild
|
||||
CONTAINER_CONFIG_DIR=../containers/config
|
||||
11
distribution/Dockerfile-config
Normal file
11
distribution/Dockerfile-config
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
FROM fedora:35
|
||||
|
||||
RUN dnf -y install \
|
||||
openssl
|
||||
|
||||
COPY ./tools/gen-certs.sh .
|
||||
COPY ./test/data/x509/openssl.cnf .
|
||||
COPY ./test/data/composer/osbuild-composer.toml /config/
|
||||
COPY ./test/data/worker/osbuild-worker.toml /config/
|
||||
COPY ./repositories /config/repositories/
|
||||
RUN ./gen-certs.sh ./openssl.cnf /config /config/ca
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
version: '2.4'
|
||||
services:
|
||||
composer:
|
||||
image: local/osbuild-composer
|
||||
build:
|
||||
context: ..
|
||||
dockerfile: ./distribution/Dockerfile-ubi
|
||||
volumes:
|
||||
- ${CONTAINER_CONFIG_DIR}/:/etc/osbuild-composer
|
||||
networks:
|
||||
net:
|
||||
ipv4_address: 172.30.0.10
|
||||
worker:
|
||||
image: local/osbuild-worker
|
||||
build:
|
||||
context: ..
|
||||
dockerfile: ./distribution/Dockerfile-worker
|
||||
# override the entrypoint to specify composer hostname and port
|
||||
entrypoint: ["/usr/libexec/osbuild-composer/osbuild-worker" "https://composer:8700"]
|
||||
volumes:
|
||||
- ${CONTAINER_CONFIG_DIR}/:/etc/osbuild-composer
|
||||
environment:
|
||||
- CACHE_DIRECTORY=/var/cache/osbuild-worker
|
||||
privileged: true
|
||||
cap_add:
|
||||
- MKNOD
|
||||
- SYS_ADMIN
|
||||
- NET_ADMIN
|
||||
networks:
|
||||
net:
|
||||
ipv4_address: 172.30.0.20
|
||||
depends_on:
|
||||
- "composer"
|
||||
|
||||
networks:
|
||||
net:
|
||||
ipam:
|
||||
driver: default
|
||||
config:
|
||||
- subnet: 172.30.0.0/16
|
||||
Loading…
Add table
Add a link
Reference in a new issue