Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
vlkb-soda
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ViaLactea
vlkb-soda
Commits
6e6e9630
Commit
6e6e9630
authored
8 months ago
by
Robert Butora
Browse files
Options
Downloads
Patches
Plain Diff
docker: change permissions on tomcat9 to allow non-root docker runs
parent
194b8f9a
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
docker/Dockerfile.soda
+11
-3
11 additions, 3 deletions
docker/Dockerfile.soda
docker/Dockerfile.soda.temurin-jammy
+8
-4
8 additions, 4 deletions
docker/Dockerfile.soda.temurin-jammy
with
19 additions
and
7 deletions
docker/Dockerfile.soda
+
11
−
3
View file @
6e6e9630
...
@@ -46,8 +46,16 @@ COPY deps/server.xml deps/server-connector.xml ${CATALINA_BASE}/conf/
...
@@ -46,8 +46,16 @@ COPY deps/server.xml deps/server-connector.xml ${CATALINA_BASE}/conf/
COPY entrypoint.sh.soda /root/entrypoint.sh
COPY entrypoint.sh.soda /root/entrypoint.sh
# run
# modif permissions to allow run as non-root
WORKDIR ${CATALINA_HOME}
RUN pwd && chmod +x /root/entrypoint.sh
# orig was: chmod 1777 logs temp work;
# logs --> /var/log/tomcat9 work --> /var/cache/tomcat9 temp (missing)
RUN chmod -R +rX .; chmod 1777 /var/log/tomcat9 /var/cache/tomcat9
WORKDIR ${CATALINA_BASE}
RUN chmod -R a+rwX conf
RUN chmod +rx /root && chmod +rx /root/entrypoint.sh
CMD ["sh", "-c", "/root/entrypoint.sh"]
CMD ["sh", "-c", "/root/entrypoint.sh"]
#RUN pwd && chmod +x /root/entrypoint.sh
#CMD ["sh", "-c", "/root/entrypoint.sh"]
This diff is collapsed.
Click to expand it.
docker/Dockerfile.soda.temurin-jammy
+
8
−
4
View file @
6e6e9630
...
@@ -9,7 +9,7 @@ ENV HOME /root
...
@@ -9,7 +9,7 @@ ENV HOME /root
RUN apt-get -y update \
RUN apt-get -y update \
&& apt-get -y install apt-utils \
&& apt-get -y install apt-utils \
&& apt-get -y install libcfitsio-bin
libcsv3 time
unzip
&& apt-get -y install libcfitsio-bin unzip
# Remove the default webapps:
# Remove the default webapps:
RUN rm -rf /usr/local/tomcat/webapps/examples/ \
RUN rm -rf /usr/local/tomcat/webapps/examples/ \
...
@@ -49,8 +49,12 @@ COPY deps/server.xml deps/server-connector.xml ${CATALINA_BASE}/conf/
...
@@ -49,8 +49,12 @@ COPY deps/server.xml deps/server-connector.xml ${CATALINA_BASE}/conf/
COPY entrypoint.sh.soda /root/entrypoint.sh
COPY entrypoint.sh.soda /root/entrypoint.sh
# run
# modif permissions to allow run as non-root
#WORKDIR ${CATALINA_HOME} <---- these set already in orig image
RUN pwd && chmod +x /root/entrypoint.sh
#RUN chmod -R +rX .; chmod 1777 logs temp work
# below needed because TSL and ROOT-CONTEXT config
WORKDIR ${CATALINA_BASE}
RUN chmod -R a+rwX conf
RUN chmod +rx /root && chmod +rx /root/entrypoint.sh
CMD ["sh", "-c", "/root/entrypoint.sh"]
CMD ["sh", "-c", "/root/entrypoint.sh"]
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment