forked from swri-robotics/bag-database
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
29 lines (20 loc) · 784 Bytes
/
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
FROM maven:3.5.2-jdk-8-slim as base-layer
LABEL maintainer="[email protected]"
# Build the bag DB in a separate stage so that the final image doesn't need
# to have the maven build environment in it.
RUN apt-get update \
&& apt-get install -y git libopencv2.4-java \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir -p /src
COPY . /src
RUN cd /src && mvn package
FROM tomcat:9-alpine
LABEL maintainer="[email protected]"
VOLUME ["/bags", "/root/.ros-bag-database/indexes", "/usr/local/tomcat/logs"]
EXPOSE 8080
RUN apk add --no-cache ffmpeg
RUN rm -rf /usr/local/tomcat/webapps/
COPY --from=base-layer /src/target/*.war /usr/local/tomcat/webapps/ROOT.war
COPY src/main/docker/entrypoint.sh /
COPY src/main/docker/server.xml /usr/local/tomcat/conf/server.xml
CMD ["/entrypoint.sh"]