-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
50 lines (30 loc) · 1.59 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
FROM openjdk:13-jdk-alpine AS build-openmole-sources
MAINTAINER Romain Reuillon <[email protected]>, Sebastien Rey-Coyrehourcq <[email protected]> Jonathan Passerat-Palmbach <[email protected]>
RUN echo http://nl.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories
RUN apk upgrade --update-cache --available
RUN apk add --update && apk add --no-cache -f gnupg ca-certificates git git-lfs curl sbt nodejs python python-pycurl bash tar gzip ca-certificates-java openssh npm nodejs-legacy tree
WORKDIR /home/root
RUN mkdir -p .ssh && \
chmod 0700 .ssh
COPY scripts/config .ssh/config
RUN git clone https://gitlab.openmole.org/openmole/openmole.git
WORKDIR /home/root/openmole
COPY scripts/compile.sh .
RUN ["sh", "compile.sh"]
FROM openjdk:13-jdk-alpine AS openmole
RUN echo http://nl.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories
RUN apk upgrade --update-cache --available
RUN apk add --update && apk add --no-cache -f ca-certificates ca-certificates-java su-exec shadow bash mlocate
ARG GID
ARG UID
RUN addgroup -g $GID mole && adduser -h /home/mole -s /bin/sh -D -G mole -u $UID mole
COPY ./scripts/docker-entrypoint.sh /usr/local/bin
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
WORKDIR /home/mole/
COPY --from=build-openmole-sources --chown=mole:mole home/root/gama-plugin/openmole/openmole/bin/openmole/target/assemble/ .
RUN chmod +x openmole
EXPOSE 8443
VOLUME /home/mole/workspace
ENV MEM=8G
ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["sh", "-c", "./openmole --mem ${MEM} --port 8443 --remote --workspace /home/mole/workspace"]