parent
c3846bebc6
commit
714461b39f
@ -0,0 +1,20 @@
|
||||
FROM ubuntu:24.04
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# Install base tools needed by the installer script.
|
||||
RUN set -eux; \
|
||||
timezone=$(cat /etc/timezone 2>/dev/null || echo Etc/UTC); \
|
||||
export TZ="${timezone}"; \
|
||||
apt-get update; \
|
||||
apt-get install -y --no-install-recommends \
|
||||
sudo ca-certificates curl wget gnupg lsb-release locales apt-utils tzdata; \
|
||||
ln -snf "/usr/share/zoneinfo/${timezone}" /etc/localtime; \
|
||||
echo "${timezone}" > /etc/timezone; \
|
||||
sed -i 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen; \
|
||||
locale-gen en_US.UTF-8; \
|
||||
update-locale LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8; \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Minimal base; you will run the Odoo script manually inside.
|
||||
CMD ["sleep", "infinity"]
|
||||
@ -0,0 +1,42 @@
|
||||
# Odoo 19 Installer Test Environment
|
||||
|
||||
This folder provides a minimal Docker setup to exercise the `odoo_install.sh` script in a clean Ubuntu 24.04 container.
|
||||
|
||||
## Prerequisites
|
||||
- Docker 24+
|
||||
- Docker Compose plugin (`docker compose` CLI)
|
||||
|
||||
## Build the Image
|
||||
```bash
|
||||
docker compose build
|
||||
```
|
||||
|
||||
## Start the Test Container
|
||||
Run the container detached so it stays online for manual testing:
|
||||
```bash
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
## Run the Installer Script Inside the Container
|
||||
1. Attach to the container shell:
|
||||
```bash
|
||||
docker compose exec odoo19 bash
|
||||
```
|
||||
2. Make the script executable (first run only):
|
||||
```bash
|
||||
chmod +x /opt/odoo-install/odoo_install.sh
|
||||
```
|
||||
3. Execute the installer:
|
||||
```bash
|
||||
/opt/odoo-install/odoo_install.sh
|
||||
```
|
||||
|
||||
The script runs as root inside the container, so the bundled `sudo` calls succeed without additional configuration. The Docker image already sets locale and timezone data to avoid interactive prompts from `tzdata`.
|
||||
|
||||
## Reset the Environment
|
||||
To destroy the test container and start fresh:
|
||||
```bash
|
||||
docker compose down -v
|
||||
```
|
||||
|
||||
Re-run the **Build** and **Start** steps to begin another test cycle.
|
||||
@ -0,0 +1,10 @@
|
||||
services:
|
||||
odoo19:
|
||||
build: .
|
||||
container_name: odoo19
|
||||
restart: unless-stopped
|
||||
command: ["sleep", "infinity"]
|
||||
tty: true
|
||||
stdin_open: true
|
||||
volumes:
|
||||
- ../odoo_install.sh:/opt/odoo-install/odoo_install.sh:ro
|
||||
Loading…
Reference in new issue