-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
90 lines (76 loc) · 2.67 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
FROM ubuntu:jammy
# software-properties-common => for add-apt-repository
RUN \
apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
autoconf \
build-essential \
ccache \
curl \
file \
g++ \
gcc \
git \
graphviz \
libasound2-dev \
libcups2-dev \
libffi-dev \
libfontconfig1-dev \
libx11-dev \
libxext-dev \
libxrandr-dev \
libxrender-dev \
libxt-dev \
libxtst-dev \
locales \
make \
openjdk-21-jdk-headless \
pandoc \
pigz \
pkg-config \
software-properties-common \
sudo \
systemtap-sdt-dev \
unzip \
wget \
zip && \
apt-get --purge remove -y .\*-doc$ && \
apt-get autoclean && \
apt-get clean -y && \
apt-get --purge -y autoremove && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen \
&& locale-gen en_US.utf8 \
&& /usr/sbin/update-locale LANG=en_US.UTF-8
ENV LANG=en_US.UTF-8 \
LANGUAGE=en_US:en \
LC_ALL=en_US.UTF-8
ARG USER_NAME=user
ARG USER_ID=1001
ARG USER_GID=1001
RUN : "adding user" && \
set -x; \
addgroup --gid ${USER_GID} ${USER_NAME} && \
adduser --home /home/${USER_NAME} --disabled-password --shell /bin/bash --gid ${USER_GID} --uid ${USER_ID} --gecos '' ${USER_NAME} && \
echo "%${USER_NAME} ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
USER ${USER_NAME}
RUN mkdir -p ~/.local/bin
USER ${USER_NAME}
ENV HOME=/home/${USER_NAME}
ENV PATH="$HOME/.local/bin:${PATH}"
WORKDIR $HOME
#COPY phlummox.tar /home/phlummox/phlummox.tar
RUN : \
git config --global user.name user && \
git config --global user.email "[email protected]"
ARG JDK_VERSION="jdk-21+13"
RUN \
sudo mkdir /opt/work && \
sudo chown ${USER_NAME} /opt/work && \
cd /opt/work && \
wget https://github.com/openjdk/jdk/archive/refs/tags/${JDK_VERSION}.tar.gz && \
tar xf *.tar.gz && \
rm *.tar.gz
# cd jdk
# sh ./configure --with-boot-jdk=$HOME/jdk-16/
# make images