-
Notifications
You must be signed in to change notification settings - Fork 20
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
base: main
Are you sure you want to change the base?
Conversation
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 ( |
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. |
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 |
There was a problem hiding this comment.
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)"
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 |
This is to provide a docker-compose workflow for Valkyrie development.