Initial implementation of the containerfile
This commit is contained in:
parent
ba6769154f
commit
c3cf284548
26
Containerfile
Normal file
26
Containerfile
Normal file
@ -0,0 +1,26 @@
|
||||
# The build stage uses debian:11 which is the same
|
||||
# base image as openjdk:11
|
||||
FROM docker.io/library/debian:11 AS builder
|
||||
|
||||
ARG version=1.0.4
|
||||
|
||||
RUN mkdir --parents /source
|
||||
ADD https://github.com/sevdokimov/log-viewer/releases/download/v$version/log-viewer-$version.tar.gz /source/release.tar.gz
|
||||
RUN ls /source/
|
||||
RUN tar -C /source/ -xf /source/release.tar.gz
|
||||
RUN mv /source/log-viewer-$version /source/log-viewer
|
||||
|
||||
FROM docker.io/library/openjdk:11
|
||||
|
||||
RUN mkdir --parents /app /logs
|
||||
|
||||
# Copy files from log-viewer release
|
||||
COPY --from=builder /source/log-viewer/lib /app/lib
|
||||
COPY --from=builder /source/log-viewer/logviewer.sh /app/logviewer.sh
|
||||
COPY --from=builder /source/log-viewer/config.conf /config.conf
|
||||
|
||||
# expose the port the the service will run on
|
||||
EXPOSE 8111
|
||||
|
||||
# command that is executed when the docker container starts
|
||||
CMD ["java", "-ea", "-Dlog-viewer.config-file=/config.conf", "-jar", "/app/lib/log-viewer-cli-1.0.4.jar", "startup"]
|
Loading…
Reference in New Issue
Block a user