GhostVaibhav commented on issue #362:
URL: https://github.com/apache/age/issues/362#issuecomment-1339813930

   I made some changes to the script:
   ```dockerfile
   # Build stage
   FROM postgres:11-buster AS build
   RUN apt-get update 
   RUN apt-get install --assume-yes --no-install-recommends 
--no-install-suggests \
     bison \
     build-essential \
     flex \
     postgresql-server-dev-11 
   COPY . /age 
   RUN cd /age && make install
   
   # Install stage
   FROM postgres:11-buster
   COPY --from=build 
/age/docker-entrypoint-initdb.d/00-create-extension-age.sql 
/docker-entrypoint-initdb.d/00-create-extension-age.sql
   COPY --from=build /usr/lib/postgresql/11/lib/age.so 
/usr/lib/postgresql/11/lib/age.so
   COPY --from=build /usr/share/postgresql/11/extension/age.control 
/usr/share/postgresql/11/extension/age.control
   CMD ["postgres", "-c", "shared_preload_libraries=age"]
   ```
   I also started working on fixing the issue but it's showing the following 
error when I try to execute the above Dockerfile:
   ```shell
   /usr/local/bin/docker-entrypoint.sh: running 
/docker-entrypoint-initdb.d/00-create-extension-age.sql
   2022-12-06 18:16:25.044 UTC [73] ERROR:  extension "age" has no installation 
script nor update path for version "1.1.0"
   2022-12-06 18:16:25.044 UTC [73] STATEMENT:  CREATE EXTENSION age;
   psql:/docker-entrypoint-initdb.d/00-create-extension-age.sql:19: ERROR:  
extension "age" has no installation script nor update path for version "1.1.0"
   ```
   
   FYI, I learned that you only need 2 files to install the extension in 
Postgres, namely `age.so` and `age.control`. But it's showing an error even 
after installing these files and copying the initial 
`00-create-extension-age.sql` file.
   On second thought, we can clean the existing image using the `apt remove` 
commands and delete the AGE repo folder altogether.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to