Dockerfile 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. FROM tomcat:9-jdk17-temurin-focal
  2. ARG USER_ID
  3. ARG GROUP_ID
  4. RUN apt-get update && apt-get install -y sudo;
  5. RUN addgroup --gid ${GROUP_ID} labkey
  6. RUN adduser --gecos 'LabKey' --uid ${USER_ID} --gid ${GROUP_ID} --disabled-password labkey
  7. RUN echo 'labkey ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
  8. RUN usermod -G root,sudo labkey
  9. USER labkey
  10. ARG RKEY=https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc
  11. ARG GPGKEY=/etc/apt/trusted.gpg.d/cran_ubuntu_key.asc
  12. RUN sudo apt-get update && sudo apt-get install -y \
  13. dirmngr \
  14. gnupg \
  15. apt-transport-https \
  16. ca-certificates \
  17. software-properties-common \
  18. && wget -qO- $RKEY | sudo tee -a $GPGKEY\
  19. && sudo add-apt-repository "deb https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/"\
  20. && sudo apt-get update --fix-missing\
  21. && sudo apt-get install -y r-base \
  22. && sudo rm -rf /var/lib/apt/lists/*
  23. RUN sudo mkdir /usr/local/labkey \
  24. && sudo chown -R labkey:labkey /usr/local/tomcat \
  25. && sudo chown -R labkey:labkey /usr/local/labkey
  26. #USER root
  27. LABEL "name"="tomcatR"