Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

switch to plain mongo image #91

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# This base image starts up mongo
# This version needs to correspond with the helm chart version
ARG MONGODBVERSION=4.0.12
FROM bitnami/mongodb:${MONGODBVERSION} as build
FROM docker.io/mongo:${MONGODBVERSION} as build

# Use .dockerignore file to ignore unwanted files
# These files are used by import_mongo.sh to initialize mongo
# Creating directories as root
# Set user back to the one in base image
USER root
RUN mkdir -p /data
RUN mkdir -p /seed && chmod 777 /seed
COPY data/ /data/

ARG ARG_REF_ENSEMBL_VERSION
Expand All @@ -17,15 +18,14 @@ ARG SPECIES=homo_sapiens
ARG MUTATIONASSESSOR=false

# Import data into mongodb
COPY scripts/import_mongo.sh /docker-entrypoint-initdb.d/
RUN /setup.sh
COPY scripts/import_mongo.sh /docker-entrypoint-initdb.d/import_mongo.sh
COPY scripts/init.sh /init.sh
RUN /init.sh mongod

FROM bitnami/mongodb:${MONGODBVERSION}
COPY --from=build /bitnami/mongodb /bitnami/seed
COPY /scripts/startup.sh /startup.sh
RUN ls -la /data/db

USER root
RUN chown -R 1001 /bitnami/seed
USER 1001
FROM docker.io/mongo:${MONGODBVERSION}
COPY --from=build /seed /seed
COPY /scripts/startup.sh /startup.sh

CMD [ "/startup.sh" ]
Loading