Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
AngryMaciek committed Aug 16, 2024
1 parent 3d2d666 commit a7cfcc6
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
{
"image": "angrymaciek/angry-runner",
"postCreateCommand": "bash /bin/entrypoint.sh"
"name": "dev",

"build": {
"dockerfile": "./Dockerfile"
},

"customizations": {
"codespaces": {
"openFiles": []
}
}
}
45 changes: 45 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1,46 @@
##### BASE IMAGE #####
FROM ubuntu:22.04

##### METADATA #####
LABEL base.image="ubuntu:22.04"
LABEL version="1.1.2"
LABEL maintainer="Maciek Bak"

##### DEFINE BUILD/ENV VARIABLES #####
ARG MAMBADIR="/mambaforge"
ARG MAMBAURL="https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-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 vim wget \
&& 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 \
&& 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
RUN /bin/bash -c "chmod +x /bin/entrypoint.sh \
&& groupadd conda \
&& chgrp -R conda ${MAMBADIR} \
&& chmod 770 -R ${MAMBADIR}"
ENTRYPOINT ["/bin/entrypoint.sh"]
CMD ["/bin/bash"]

0 comments on commit a7cfcc6

Please sign in to comment.