forked from xetus-oss/docker-archiva
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
43 lines (35 loc) · 1.28 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
FROM java:7u65
MAINTAINER Lu Han <lhan@xetus.com>
ENV VERSION 2.2.0
#
# Go get the needed tar/jar we'll installing
#
RUN curl -sSLo /apache-archiva-$VERSION-bin.tar.gz http://archive.apache.org/dist/archiva/$VERSION/binaries/apache-archiva-$VERSION-bin.tar.gz \
&& tar --extract --ungzip --file apache-archiva-$VERSION-bin.tar.gz --directory / \
&& rm /apache-archiva-$VERSION-bin.tar.gz && mv /apache-archiva-$VERSION /opt/archiva \
&& curl -sSLo /opt/archiva/lib/mysql-connector-java-5.1.35.jar http://search.maven.org/remotecontent?filepath=mysql/mysql-connector-java/5.1.35/mysql-connector-java-5.1.35.jar
#
# Adjust ownership and Perform the data directory initialization
#
ADD data_dirs.env /data_dirs.env
ADD init.bash /init.bash
ADD jetty_conf /jetty_conf
# Sync calls are due to https://github.com/docker/docker/issues/9547
RUN useradd -d /opt/archiva/data -m archiva &&\
cd /opt && chown -R archiva:archiva archiva &&\
cd / && chown -R archiva:archiva /jetty_conf &&\
chmod 755 /init.bash &&\
sync && /init.bash &&\
sync && rm /init.bash
#
# Add the bootstrap cmd
#
ADD run.bash /run.bash
RUN chmod 755 /run.bash
#
# All data is stored on the root data volume.
USER archiva
VOLUME ["/archiva-data"]
# Standard web ports exposted
EXPOSE 8080/tcp 8443/tcp
ENTRYPOINT ["/run.bash"]