-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
49 lines (42 loc) · 1.57 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
##### BASE IMAGE #####
FROM ubuntu:24.04
##### METADATA #####
LABEL base.image="ubuntu:24.04"
LABEL version="1.3.1"
LABEL maintainer="Maciek Bak"
##### DEFINE BUILD/ENV VARIABLES #####
ARG MAMBADIR="/mambaforge"
ARG MAMBAURL="https://github.com/conda-forge/miniforge/releases/download/24.3.0-0/Mambaforge-24.3.0-0-Linux-x86_64.sh"
ENV LANG C.UTF-8
##### INSTALL SYSTEM-LEVEL DEPENDENCIES #####
RUN apt-get update \
&& apt-get install --no-install-recommends --yes \
ca-certificates cmake curl g++ gcc git gnupg2 gosu make valgrind vim wget zsh \
&& apt-get autoremove -y \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
##### INSTALL MAMBAFORGE & PKGS #####
RUN /bin/bash -c "curl -L ${MAMBAURL} > mambaforge.sh \
&& bash mambaforge.sh -b -p ${MAMBADIR} \
&& ${MAMBADIR}/bin/conda config --system --set channel_priority strict \
&& source ${MAMBADIR}/bin/activate \
&& conda init bash \
&& conda init zsh \
&& mamba install boa conda-build conda-verify -c conda-forge --yes \
&& conda clean --all --yes \
&& rm -f mambaforge.sh"
##### EXPOSE PORTS #####
EXPOSE 8888
##### PREPARE WORKING DIRECTORY #####
VOLUME /workdir
WORKDIR /workdir
##### SETUP ENTRYPOINT W/ NONROOT USER #####
COPY entrypoint.sh /bin/entrypoint.sh
COPY prezto-user-setup.sh /usr/local/bin/prezto-user-setup.sh
RUN /bin/bash -c "chmod +x /bin/entrypoint.sh \
&& groupadd conda \
&& chgrp -R conda ${MAMBADIR} \
&& chmod 770 -R ${MAMBADIR} \
&& chmod 755 /usr/local/bin/prezto-user-setup.sh"
ENTRYPOINT ["/bin/entrypoint.sh"]
CMD ["/bin/bash"]