-
Notifications
You must be signed in to change notification settings - Fork 107
/
Dockerfile.dev
38 lines (30 loc) · 1.48 KB
/
Dockerfile.dev
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
FROM rockylinux/rockylinux:8
LABEL maintainer="[email protected]; [email protected]"
ARG USER=ood
ARG UID=1000
ARG GID=1000
RUN dnf install -y https://yum.osc.edu/ondemand/latest/ondemand-release-web-latest-1-6.noarch.rpm && \
dnf clean all && rm -rf /var/cache/dnf/*
RUN cp /etc/yum.repos.d/ondemand-web.repo /etc/yum.repos.d/ondemand-nightly-web.repo && \
sed /etc/yum.repos.d/ondemand-web.repo -e 's/latest/nightly/g' \
-e 's/ondemand-web/ondemand-web-nightly/g' > /etc/yum.repos.d/ondemand-nightly-web.repo
RUN dnf -y update && \
dnf install -y dnf-utils && \
dnf config-manager --set-enabled powertools && \
dnf -y module enable nodejs:18 ruby:3.1 && \
dnf install -y epel-release && \
dnf install -y ondemand ondemand-dex && \
dnf install -y gcc gcc-c++ libyaml-devel nc && \
dnf clean all && rm -rf /var/cache/dnf/*
RUN sed -i 's#^CREATE_MAIL_SPOOL=yes#CREATE_MAIL_SPOOL=no#' /etc/default/useradd; \
grep $GID /etc/group >/dev/null || groupadd -g $GID $USER; \
useradd -l -u $UID --create-home --gid $GID $USER && \
sudo -u $USER mkdir -p /home/$USER/ondemand/dev && \
mkdir -p "/var/www/ood/apps/dev/$USER" && \
ln -s "/home/$USER/ondemand/dev" "/var/www/ood/apps/dev/$USER/gateway" && \
echo "$USER ALL=(ALL) NOPASSWD:ALL" >/etc/sudoers.d/$USER
RUN sed -i 's|--rpm|--rpm -f --insecure|g' /etc/systemd/system/httpd.service.d/ood-portal.conf
RUN systemctl enable httpd ondemand-dex
CMD [ "/sbin/init" ]
EXPOSE 8080
EXPOSE 5556