forked from glencoesoftware/bioformats2raw
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
33 lines (28 loc) · 1020 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
30
31
32
33
# Development Dockerfile for bioformats2raw
# -----------------------------------------
# To install the built distribution into other runtimes
# pass a build argument, e.g.:
#
# docker build --build-arg IMAGE=openjdk:9 ...
#
# Similarly, the BUILD_IMAGE argument can be overwritten
# but this is generally not needed.
ARG BUILD_IMAGE=gradle:6.2.1-jdk8
#
# Build phase: Use the gradle image for building.
#
FROM ${BUILD_IMAGE} as build
USER root
RUN apt-get update -qq && DEBIAN_FRONTEND=noninteractive apt-get install -y -qq zeroc-ice-all-runtime libblosc1
RUN mkdir /bioformats2raw && chown 1000:1000 /bioformats2raw
# Build all
USER 1000
COPY --chown=1000:1000 . /bioformats2raw
WORKDIR /bioformats2raw
RUN gradle build
RUN cd build/distributions && rm bioformats2raw*tar && unzip bioformats2raw*zip && rm -rf bioformats2raw*zip
USER root
RUN mv /bioformats2raw/build/distributions/bioformats2raw* /opt/bioformats2raw
USER 1000
WORKDIR /opt/bioformats2raw
ENTRYPOINT ["/opt/bioformats2raw/bin/bioformats2raw"]