UNCLASSIFIED
Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
Ironbank Containers
DIAT
AAP Mongo
Commits
6285f55a
Commit
6285f55a
authored
Jul 21, 2021
by
WingKwan Lau
Browse files
Update Dockerfile, LICENSE files
parent
14620d7b
Pipeline
#379480
failed with stages
in 20 seconds
Changes
2
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
200 additions
and
0 deletions
+200
-0
Dockerfile
Dockerfile
+38
-0
LICENSE
LICENSE
+162
-0
No files found.
Dockerfile
0 → 100644
View file @
6285f55a
ARG
BASE_REGISTRY=registry1.dso.mil
ARG
BASE_IMAGE=mongo/mongo
ARG
BASE_TAG=latest
FROM
${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG}
# switch to root in order to fix permissions
USER
root
# define Mongo's data and configuration directories
ENV
DATA_DIR=/data/db \
CONFIG_DIR=/data/configdb \
WORKING_DIR=/home/containeruser
# create container user's home directory
RUN
mkdir
-p
$WORKING_DIR
# copy over the script to make permissions compatible with OpenShift
COPY
IronbankFiles/scripts/fix-permissions.sh /usr/local/bin
# ensure the script is executable
RUN
chmod
a+x /usr/local/bin/fix-permissions.sh
# set up container user and adjust permissions to run in OpenShift environment
RUN
fix-permissions.sh
${
DATA_DIR
}
-P
&&
\
fix-permissions.sh
${
CONFIG_DIR
}
-P
&&
\
fix-permissions.sh
${
WORKING_DIR
}
-P
RUN
ls
-ltrh
${
DATA_DIR
}
RUN
ls
-ltrh
${
CONFIG_DIR
}
RUN
ls
-ltrh
${
WORKING_DIR
}
# set home directory to persistent volume directory
ENV
HOME=/var/lib/mongodb/data
# switch back to mongodb (for non-containerized environments)
USER
mongodb:mongodb
LICENSE
0 → 100644
View file @
6285f55a
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment