FROM openjdk:8-alpine MAINTAINER EstiNet ARG PORT_NUM ENV PORT_NUM ${PORT_NUM:-25400} ARG EC_PORT_NUM ENV EC_PORT_NUM ${EC_PORT_NUM:-7000} EXPOSE $EC_PORT_NUM $PORT_NUM COPY . /usr/src/server WORKDIR /usr/src/server RUN echo server-port=$PORT_NUM >> server.properties RUN echo port=$EC_PORT_NUM >> esticonsole.properties # Install glibc dependency RUN apk --no-cache add ca-certificates wget RUN wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://raw.githubusercontent.com/sgerrand/alpine-pkg-glibc/master/sgerrand.rsa.pub RUN wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.27-r0/glibc-2.27-r0.apk RUN apk add glibc-2.27-r0.apk # RUN apk add --no-cache screen RUN mkdir /data # CMD screen -S -X 'java -jar EstiConsole.jar\n' CMD exec java -jar EstiConsole.jar