Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Provides docker-compose alternative workflow for Valkyrie development #891

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dchandekstark
Copy link
Member

@dchandekstark dchandekstark commented Feb 4, 2022

This is to provide a docker-compose workflow for Valkyrie development.

@dchandekstark dchandekstark changed the title WIP Provides docker-compose alternative workflow for Valkyrie development Feb 5, 2022
@dchandekstark
Copy link
Member Author

I need a consult on the Dockerfile for fcrepo4. The entry point script has some odd (to me) things that are causing it not to start on my system:

for MEM_FILE in memory.limit_in_bytes memory.memsw.limit_in_bytes memory.kmem.limit_in_bytes; do
  if [[ -e /sys/fs/cgroup/memory/${MEM_FILE} ]]; then
    break
  fi
done

if [[ ! -e /sys/fs/cgroup/memory/${MEM_FILE} ]]; then
  echo "Could not read container memory. Exiting."
  exit 1
fi

Just to be clear I can't run this image with plain Docker (docker run --rm -it samvera/fcrepo4:4.7.5 bash) without bypassing the entrypoint.

@dchandekstark
Copy link
Member Author

dchandekstark commented Feb 7, 2022

The fcrepo 4 and 5 docker image tags are 3 yo, committed by @mbklein. I have a custom fcrepo4 container image that we use for a Hyrax instance, but it's a bit different: https://gitlab.oit.duke.edu/devops/containers/fcrepo4.

@dchandekstark dchandekstark linked an issue Feb 7, 2022 that may be closed by this pull request
@tpendragon
Copy link
Collaborator

There may be official fcrepo images now, I know we pull official ones for Fedora 6. I'll be honest, this isn't really my strength.


RUN chmod -R 0777 .

USER 1001:0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these lines cause me to get a permission error when i try to run

docker-compose exec valkyrie bundle exec rake

and since this isn't a production image i don't think we need to set a non-default user. this change got tests running for me (although i got a number of failures which i haven't looked into yet):

 Dockerfile | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index 24cb7f6..d4b44dd 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -5,12 +5,8 @@ SHELL ["/bin/bash", "-c"]

 WORKDIR /opt/valkyrie

-COPY . .
-
-RUN chmod -R 0777 .
+RUN gem install bundler

-USER 1001:0
-
-ENV HOME=/opt/valkyrie
+COPY . .

-RUN gem install bundler && bundle install
+RUN bundle install --jobs "$(nproc)"

@dunn
Copy link
Collaborator

dunn commented Jun 15, 2022

The fcrepo 4 and 5 docker image tags are 3 yo, committed by @mbklein. I have a custom fcrepo4 container image that we use for a Hyrax instance, but it's a bit different: https://gitlab.oit.duke.edu/devops/containers/fcrepo4.

do you know where the Dockerfile for the official images are maintained? the https://github.com/fcrepo4-labs/fcrepo4-docker repository still points to the old https://hub.docker.com/r/yinlinchen/fcrepo4-docker/ image

EDIT ah, missed the link in the dockerhub page to https://github.com/nulib/docker-fcrepo

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Transition Lando to docker-compose for development environment
4 participants