Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
Dockerfiles
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
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
shore
Dockerfiles
Commits
c3f03905
Commit
c3f03905
authored
4 years ago
by
nimrod
Browse files
Options
Downloads
Patches
Plain Diff
Use the httpd base image for cgit.
parent
8e044762
Branches
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#1622
passed
3 years ago
Stage: .pre
Stage: build
Stage: deploy
Changes
1
Pipelines
3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
cgit/Dockerfile
+4
-22
4 additions, 22 deletions
cgit/Dockerfile
with
4 additions
and
22 deletions
cgit/Dockerfile
+
4
−
22
View file @
c3f03905
FROM
debian:buster-slim
# hadolint ignore=DL3006
FROM
registry.shore.co.il/httpd
USER
root
# hadolint ignore=DL3008,DL3015
# hadolint ignore=DL3008,DL3015
RUN
apt-get update
&&
\
RUN
apt-get update
&&
\
DEBIAN_FRONTEND
=
noninteractive apt-get
install
-y
\
DEBIAN_FRONTEND
=
noninteractive apt-get
install
-y
\
apache2
\
cgit
\
cgit
\
groff-base
\
groff-base
\
libcap2-bin
\
patch
\
patch
\
python3-docutils
\
python3-docutils
\
python3-markdown
\
python3-markdown
\
python3-pygments
\
python3-pygments
\
wget
\
&&
\
&&
\
setcap
CAP_NET_BIND_SERVICE
=
+ep /usr/sbin/apache2
&&
\
a2enmod cgid
&&
\
a2enmod cgid
&&
\
a2enconf cgit
&&
\
a2enconf cgit
&&
\
a2enmod status
&&
\
install
-d
-o
www-data
-g
www-data
-m
755 /var/cache/cgit
&&
\
install
-d
-o
www-data
-g
www-data
-m
755 /var/cache/cgit
&&
\
install
-d
-o
www-data
-g
www-data
-m
755 /run/apache2
&&
\
install
-d
-o
www-data
-g
www-data
-m
755 /var/log/apache2
&&
\
ln
-sf
/dev/stdout /var/log/apache2/access.log
&&
\
ln
-sf
/dev/stderr /var/log/apache2/error.log
&&
\
ln
-sf
/dev/stdout /var/log/apache2/other_vhosts_access.log
&&
\
rm
-rf
/tmp/
*
/var/tmp/
*
/var/lib/apt/lists/
*
/var/cache/apt/archives/
*
rm
-rf
/tmp/
*
/var/tmp/
*
/var/lib/apt/lists/
*
/var/cache/apt/archives/
*
COPY
--chown=root:root patch.diff /root/
COPY
--chown=root:root patch.diff /root/
COPY
--chown=root:root cgitrc /etc/
COPY
--chown=root:root cgitrc /etc/
ENV
APACHE_RUN_DIR=/run/apache2 \
APACHE_LOG_DIR=/var/log/apache2 \
APACHE_RUN_USER=www-data \
APACHE_RUN_GROUP=www-data \
APACHE_PID_FILE=/run/apache2/apache2.pid
RUN
patch
--strip
0
--verbose
--directory
/etc/apache2
--input
/root/patch.diff
&&
\
RUN
patch
--strip
0
--verbose
--directory
/etc/apache2
--input
/root/patch.diff
&&
\
apache2
-t
apache2
-t
EXPOSE
80
USER
www-data
CMD
[ "apache2", "-DFOREGROUND" ]
VOLUME
["/srv/git"]
USER
"www-data"
WORKDIR
/var/www
HEALTHCHECK
CMD wget --spider --quiet http://localhost:80/cgit/ --user-agent 'Healthcheck' || exit 1
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