Antes de comenzar
Asegúrate de haber instalado AlloyDB Omni en tu sistema.
Agrega orafce a tu instalación de AlloyDB Omni
Para agregar la extensión orafce a tu instalación de AlloyDB Omni, sigue estos pasos:
- Encuentra las etiquetas de la versión de AlloyDB Omni instalada:
  Dockerdocker run --rm -it google/alloydbomni cat VERSION.txt Podmanpodman run --rm -it google/alloydbomni cat VERSION.txt El resultado es similar a este: AlloyDB Omni version: 15.7.0 Toma nota del número de versión de AlloyDB Omni, ya que lo necesitarás en el siguiente paso. 
- Establece la variable de entorno OMNI_VERSION:OMNI_VERSION=VERSION Reemplaza VERSION por la versión completa del servidor de la base de datos del paso anterior, por ejemplo, 15.7.0.
-  Crea un nuevo contenedor de AlloyDB Omni que incluya orafce:
   Linuxmkdir ~/alloydb-omni-orafcetee -a ~/alloydb-omni-orafce/Dockerfile << EOF ARG OMNI_VERSION FROM google/alloydbomni:${OMNI_VERSION} RUN apt-get update &&
 apt-get install -y --no-install-recommends
 postgresql-15-orafce &&
 apt-get purge -y --auto-remove &&
 rm -rf /var/lib/apt/lists/* EOFcd ~/alloydb-omni-orafcesudo docker build --build-arg OMNI_VERSION=$OMNI_VERSION --tag google/alloydbomni-with-orafce:$OMNI_VERSION .macOSmkdir ~/alloydb-omni-orafcetee -a ~/alloydb-omni-orafce/Dockerfile << EOF ARG OMNI_VERSION FROM google/alloydbomni:${OMNI_VERSION} RUN apt-get update &&
 apt-get install -y --no-install-recommends
 postgresql-15-orafce &&
 apt-get purge -y --auto-remove &&
 rm -rf /var/lib/apt/lists/* EOFcd ~/alloydb-omni-orafcesudo docker build --build-arg OMNI_VERSION=$OMNI_VERSION --tag google/alloydbomni-with-orafce:$OMNI_VERSION .
- Crea un nuevo contenedor con AlloyDB Omni llamado - my-omni-orafce:- docker run --name my-omni-orafce -e POSTGRES_PASSWORD=NEW_PASSWORD -d google/alloydbomni-with-orafce:OMNI_VERSION 
- Conéctate a tu base de datos con la extensión orafce: - docker exec -it my-omni-orafce psql -h localhost -U postgres 
- Habilita orafce:
   CREATE EXTENSION IF NOT EXISTS ORAFCE; 
- Confirma que orafce esté instalado y habilitado: - SELECT oracle.sysdate(); - El resultado es similar al siguiente: - postgres=# SELECT oracle.sysdate();- sysdate- ---------------------- 2024-06-10 16:36:30- (1 row)