Hi Kiran, That error appears to be saying that it cannot find the "dspacedb" service you've created. I'm not sure why that service isn't accessible...you may want to check the logs to see if it started properly, and see if you can access it yourself after it starts.
You also may want to take a closer look at the (development ready) Docker scripts we have in the DSpace 6.x codebase. They provide you with clues on how to setup your Docker scripts. Keep in mind, we've NEVER tested/run our Docker scripts in Production, so they may one work for development. Main docker-compose script: https://github.com/DSpace/DSpace/blob/dspace-6_x/docker-compose.yml Uses this Dockerfile by default: https://github.com/DSpace/DSpace/blob/dspace-6_x/Dockerfile.jdk8-test If you have additional questions, feel free to ask on the lists. Keep in mind though that it could prove difficult to debug your Docker scripts for you...as sometimes the issue is more in your Docker network settings than in anything easily "visible" in your scripts. Tim ________________________________ From: [email protected] <[email protected]> on behalf of Kiran Dhakal <[email protected]> Sent: Tuesday, August 30, 2022 5:19 AM To: DSpace Community <[email protected]> Subject: [dspace-community] Error while installing DSpace 6.4 in docker using docker-compose I wanted to install DSpace 6.4 using the source release in docker using docker-compose. I copied most of the docker-compose file from the tutorial in https://www.youtube.com/watch?v=ovJ8sJk1Apg . Instead of the image that they used for dspace service, I wrote a Dockerfile using steps given in the installation manual. My docker-compose file looks like the following: version: "3.3" services: dspacedb: image: dspace/dspace-postgres-pgcrypto # Note that a separate image exists for DSpace 4x # image: dspace/dspace-postgres-4x container_name: dspacedb environment: - PGDATA=/pgdata volumes: - pgdata:/pgdata networks: - dspacenet tty: true stdin_open: true dspace: build: ./dspace container_name: dspace environment: - DSPACE_INSTALL=dspace - SCRIPTVER=6 ports: - 8080:8080 volumes: - "assetstore:/dspace/assetstore" - "solr:/dspace/solr" # - "/add-ons/mirage2/xmlui.xconf:/dspace/config/xmlui.xconf" networks: - dspacenet depends_on: - dspacedb tty: true stdin_open: true volumes: pgdata: assetstore: solr: networks: dspacenet: My Dockerfile: FROM ubuntu:18.04 RUN useradd -m dspace WORKDIR /dspace COPY . . RUN apt-get update RUN apt-get install unzip RUN apt-get install openjdk-8-jdk -y RUN apt-get install git -y RUN apt-get install ant -y RUN apt-get install maven -y RUN unzip dspace-6.4-src-release.zip COPY ./local.cfg dspace-6.4-src-release/dspace/config/ RUN mkdir dspace RUN chown dspace dspace RUN su - dspace RUN cd dspace-6.4-src-release && mvn package RUN cd dspace-6.4-src-release/dspace/target/dspace-installer && ant fresh_install RUN cp -r dspace-6.4-src-release/dspace/webapps/* /tomcat/webapps RUN /etc/init.d/tomcat start RUN dspace-6.4-src-release/dspace/bin/dspace create-administrator In the Dockerfile, I copied ./local.cfg where I have configured the following: dspace.dir = dspace-6.4-src-release/dspace dspace.hostname = dspace dspace.baseUrl = http://dspace:8080 solr.server = http://dspace:8080/solr db.url = jdbc:postgresql://dspacedb:5432/dspace Rest of the content is from the file local.cfg.EXAMPLE from the source release. I put the dspace.hostname as dspace because of the container's name in docker-compose.yml file. I am not sure if that is the right thing to do. And for the same reason, the value of db.url also contains dspacedb. I tried the command docker-compose up --build from my terminal. The mvn package command runs successfully. But I get an error on command ant fresh_install. The error is in the screenshot. I have tried by changing the default hostnames and url but I always get the error similar to UnknownHost : dspacedb Could anyone explain my mistake and point me towards the right direction? Thank you - Kiran -- All messages to this mailing list should adhere to the Code of Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx --- You received this message because you are subscribed to the Google Groups "DSpace Community" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]<mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-community/1bfb048a-f54b-491c-88e0-ed9616eb1e6fn%40googlegroups.com<https://groups.google.com/d/msgid/dspace-community/1bfb048a-f54b-491c-88e0-ed9616eb1e6fn%40googlegroups.com?utm_medium=email&utm_source=footer>. -- All messages to this mailing list should adhere to the Code of Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx --- You received this message because you are subscribed to the Google Groups "DSpace Community" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-community/PH0PR22MB32741BE4CAF7EFCD912A2442ED799%40PH0PR22MB3274.namprd22.prod.outlook.com.
