Skip to content

Commit 6670a14

Browse files
author
Vladimir Kotal
committed
revert to fetcher
1 parent 1106ade commit 6670a14

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

dockerfile renamed to Dockerfile

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,28 @@
1-
FROM maven:latest as builder
1+
FROM debian:stable-slim as fetcher
22

3+
# TODO copy just the 'distribution' directory, not all source code
34
COPY ./ /opengrok-source
45
WORKDIR /opengrok-source
56

6-
RUN apt-get update && apt-get install -y python3 python3-venv
7-
RUN mvn -f pom.xml clean package -DskipTests=true
7+
# update the system
8+
RUN apt-get update
9+
810
# find most recent package file
911
RUN cp `ls -t distribution/target/*.tar.gz | head -n1 |awk '{printf("%s",$0)}'` /opengrok.tar.gz
1012

1113
FROM tomcat:9-jre8
1214
LABEL maintainer "[email protected]"
1315

1416
# prepare OpenGrok binaries and directories
15-
COPY --from=builder opengrok.tar.gz /opengrok.tar.gz
17+
COPY --from=fetcher opengrok.tar.gz /opengrok.tar.gz
1618
RUN mkdir -p /opengrok /var/opengrok/etc /opengrok/data /opengrok/src && \
1719
tar -zxvf /opengrok.tar.gz -C /opengrok --strip-components 1 && \
1820
rm -f /opengrok.tar.gz
1921

20-
# install dependencies
21-
RUN apt-get update && apt-get install -y git subversion mercurial unzip inotify-tools python3 python3-pip && \
22+
# install dependencies and Python tools
23+
RUN apt-get update && apt-get install -y git subversion mercurial unzip inotify-tools python3 python3-pip python3-venv && \
2224
python3 -m pip install /opengrok/tools/opengrok-tools*
25+
2326
# compile and install universal-ctags
2427
RUN apt-get install -y pkg-config autoconf build-essential && git clone https://github.com/universal-ctags/ctags /root/ctags && \
2528
cd /root/ctags && ./autogen.sh && ./configure && make && make install && \
@@ -39,7 +42,6 @@ ENV CATALINA_TMPDIR /usr/local/tomcat/temp
3942
ENV JRE_HOME /usr
4043
ENV CLASSPATH /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar
4144

42-
4345
# custom deployment to / with redirect from /source
4446
RUN rm -rf /usr/local/tomcat/webapps/* && \
4547
opengrok-deploy /opengrok/lib/source.war /usr/local/tomcat/webapps/ROOT.war && \

docker/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ The first reindex will take some time to finish. Subsequent reindex will be incr
7676

7777
If you want to do your own development, you can build the image yourself:
7878

79-
docker build -t opengrok-dev .
79+
mvn -DskipTests=true clean package && \
80+
docker build -t opengrok-dev .
8081

8182
Then run the container:
8283

0 commit comments

Comments
 (0)