-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
36 lines (29 loc) · 1.12 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
# APPLICATION RUNTIME container
FROM debian:buster-slim
ARG VERSION=NOT-SET
ARG BUILD_DATE=NOT-SET
ARG VCS_REF=NOT-SET
LABEL org.opencontainers.image.authors="[email protected]" \
org.label-schema.build-date=$BUILD_DATE \
org.label-schema.version=$VERSION.$BUILD_DATE \
org.label-schema.vcs-url="https://github.com/klibio/docker-osgi-starterkit" \
org.label-schema.vcs-ref=$VCS_REF
ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
fontconfig locales unzip nano \
tzdata curl ca-certificates \
&& echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen \
&& locale-gen en_US.UTF-8 \
&& rm -rf /var/lib/apt/lists/*
RUN groupadd --gid 1000 app && \
useradd --home-dir /data --shell /bin/bash --uid 1000 --gid 1000 app && \
mkdir -p /data && \
echo $VERSION.$BUILD_DATE > /data/build_$VERSION.$BUILD_DATE.txt
COPY version.txt /data
ADD resources/data /data
RUN cd /data && \
./setup_01_java.sh && \
./setup_02_osgi-starterkit.sh
ENV PATH=/data/jre/bin:$PATH
CMD ["data/osgi/rt"]