Compare commits

..

No commits in common. "7386f2f9d9d1774d238878ef238560d5e29d7657" and "116a75de6771e0f2fc7c07b713e2953aa1e80996" have entirely different histories.

3 changed files with 18 additions and 32 deletions

View File

@ -5,29 +5,14 @@ FROM git.query.consul/unkin/almalinux8:latest
RUN dnf clean all && \ RUN dnf clean all && \
dnf makecache dnf makecache
# Install nodejs:20 for actions
RUN dnf module enable -y nodejs:20 && \
dnf install -y nodejs
# Install packages # Install packages
RUN dnf install -y python3.12 python3.12-pip RUN dnf groupinstall -y 'Development Tools' && \
dnf install -y make cmake gcc gcc-c++ rpm rpmdevtools wget
# Cleanup # Cleanup
RUN dnf clean all && \ RUN dnf clean all && \
rm -rf /var/cache/dnf rm -rf /var/cache/dnf
# create venv for jupyter
RUN python3.12 -m venv /opt/jupyter
# upgrade pip
RUN /opt/jupyter/bin/python -m pip install --upgrade pip
# install requirements for jupyterhub-singleinstance
RUN /opt/jupyter/bin/pip install \
'jupyterhub==5.2.1' \
'notebook==7.2.2'
# create a user, since we don't want to run as root
RUN useradd -m jupyter
ENV HOME=/home/jupyter
WORKDIR $HOME
USER jupyter
# set the default command
CMD ["/opt/jupyter/bin/jupyterhub-singleuser"]

View File

@ -5,7 +5,7 @@ GIT_COMMIT := $(shell git rev-parse --short HEAD)
DATE_TAG := $(shell date +%Y%m%d) DATE_TAG := $(shell date +%Y%m%d)
# Set the Docker image name and repository information # Set the Docker image name and repository information
IMAGE_NAME := almalinux8-jupyterinstance IMAGE_NAME := almalinux8-template
REGISTRY := git.query.consul REGISTRY := git.query.consul
OWNER := unkin OWNER := unkin
@ -21,9 +21,10 @@ tag:
# Push the Docker image to a repository with all tags # Push the Docker image to a repository with all tags
push: tag push: tag
docker push $(REGISTRY)/$(OWNER)/$(IMAGE_NAME):$(GIT_COMMIT) echo "template repo, not pushing"
docker push $(REGISTRY)/$(OWNER)/$(IMAGE_NAME):$(DATE_TAG) #docker push $(REGISTRY)/$(OWNER)/$(IMAGE_NAME):$(GIT_COMMIT)
docker push $(REGISTRY)/$(OWNER)/$(IMAGE_NAME):latest #docker push $(REGISTRY)/$(OWNER)/$(IMAGE_NAME):$(DATE_TAG)
#docker push $(REGISTRY)/$(OWNER)/$(IMAGE_NAME):latest
# Clean up dangling Docker images # Clean up dangling Docker images
clean: clean:

View File

@ -1,4 +1,4 @@
# Docker Image Build: Almalinux Jupyterinstance # Docker Image Build: Almalinux Template
This project provides a reproducible Docker image build process for `almalinux:8.10`, with custom YUM repository configurations and package installations. The build is automated using a `Makefile` and managed via CI tasks to ensure consistent and reliable Docker image builds. This project provides a reproducible Docker image build process for `almalinux:8.10`, with custom YUM repository configurations and package installations. The build is automated using a `Makefile` and managed via CI tasks to ensure consistent and reliable Docker image builds.
@ -16,7 +16,7 @@ To build the Docker image without tags:
make build make build
``` ```
This will use the `docker build` command with `--network=host` to build the image with the name `git.query.consul/unkin/almalinux8-jupyterinstance. This will use the `docker build` command with `--network=host` to build the image with the name `git.query.consul/unkin/almalinux8-template`.
### Tag the Docker Image ### Tag the Docker Image
@ -27,9 +27,9 @@ make tag
``` ```
This will add three tags to the image: This will add three tags to the image:
- `git.query.consul/unkin/almalinux8-jupyterinstance:<GIT_COMMIT>` - `git.query.consul/unkin/almalinux8-template:<GIT_COMMIT>`
- `git.query.consul/unkin/almalinux8-jupyterinstance:<DATE_TAG>` - `git.query.consul/unkin/almalinux8-template:<DATE_TAG>`
- `git.query.consul/unkin/almalinux8-jupyterinstance:latest` - `git.query.consul/unkin/almalinux8-template:latest`
### Push the Docker Image ### Push the Docker Image
@ -67,8 +67,8 @@ To test or develop with this `Makefile`, follow these steps:
1. **Clone the repository** and navigate to the project directory: 1. **Clone the repository** and navigate to the project directory:
```bash ```bash
git clone https://git.query.consul/unkin/docker-almalinux-jupyterinstance.git git clone https://git.query.consul/unkin/docker-template.git
cd docker-almalinux-jupyterinstance cd docker-template
``` ```
2. **Build the Docker image** using the `build` target: 2. **Build the Docker image** using the `build` target: