forked from JetBrains/intellij-community
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
40 lines (39 loc) · 1.61 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
# syntax=docker/dockerfile:1
FROM ubuntu:20.04 AS build_env
LABEL Description="Huly Code Build Environment"
RUN apt-get update && \
apt-get install -y wget \
tar \
p7zip-full \
libfreetype6 \
fontconfig \
zip \
unzip \
libgl1-mesa-glx \
squashfs-tools \
# IJPL-173242
git \
&& rm -rf /var/lib/apt/lists/*
# optional volume to reuse Maven cache from the host
VOLUME /home/ide_builder/.m2
# the home directory should exist and be writable for any user used to launch a container because it is required for the IDE
RUN useradd --create-home ide_builder && \
# the .m2 directory should be initialized with something \
# otherwise the `chmod` effect is discarded if no Maven cache volume is specified for `docker run`
mkdir -p /home/ide_builder/.m2/repository && \
chmod --recursive a+rwx /home/ide_builder
# for jps-bootstrap itself
ENV BOOTSTRAP_SYSTEM_PROPERTIES="-Duser.home=/home/ide_builder"
# Community sources root
VOLUME /community
WORKDIR /community
ENTRYPOINT ["/bin/sh", "./installers-huly.cmd"]
# the repository has to be specified as a safe directory,
# otherwise git calls will detect dubious ownership (see https://github.com/git/git/blob/master/Documentation/config/safe.txt),
# if the container's user doesn't match the host's user (no `--user "$(id -u)"` argument is supplied for `docker run`)
RUN git init /community && \
git config --global --add safe.directory /community && \
rm -rf /community/.git
FROM build_env AS huly_code
LABEL Description="Huly Code Build Environment"
ENTRYPOINT ["/bin/sh", "./installers-huly.cmd", "-Duser.home=/home/ide_builder"]