Running Oracle 19c in a Docker container: part 1: out of disk space on my VM

This should be filed under “Can you? Yes. Should you? Probably not”

I tried creating a Docker container running Oracle 19c from Oracle official dockerfiles, and straight out of the gate ran out of diskspace:



!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
checkSpace.sh: ERROR - There is not enough space available in the docker container.
checkSpace.sh: The container needs at least 18 GB, but only 14 GB are available.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Removing intermediate container b53a5e13a45c
The command '/bin/sh -c chmod ug+x $INSTALL_DIR/*.sh &&     sync &&     $INSTALL_DIR/$CHECK_SPACE_FILE &&     $INSTALL_DIR/$SETUP_LINUX_FILE &&     rm -rf $INSTALL_DIR' returned a non-zero code: 1


ERROR: Oracle Database Docker Image was NOT successfully created.
ERROR: Check the output and correct any reported problems with the docker build operation.

$ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            3.9G     0  3.9G   0% /dev
tmpfs           798M  1.3M  797M   1% /run
/dev/sda2        30G   12G   17G  41% /

The container needs at least 18GB? Of course it does.

Time to expand my VM disk space (using notes from when I previously had to do this here), and try again.

Kubernetes: creating a hostPath PersistentVolume in a single node cluster

To create a ‘hostPath’ PersistentVolume in a single node cluster (do not use in a cluster with more than 1 node):

kind: PersistentVolume
apiVersion: v1
metadata:
name: pv1
labels:
type: local
spec:
storageClassName: manual
capacity:
storage: 1Gi
accessModes:
- ReadWriteOnce
hostPath:
path: "/your-path-for-vol1"

If the above is pv1.yaml, apply with:

kubectl apply -f pv1.yaml

For more info, see the docs here.

Helm install of MariaDB on bare metal Kubernetes: “mkdir: cannot create directory ‘/bitnami/mariadb/data’: Permission denied”

Installing the MariaDB chart with Helm on Kubernetes, I ran into issues with permissions on the folder that I created for the PersistentVolume:

INFO  ==> ** Starting MariaDB setup **
INFO ==> Validating settings in MYSQL_/MARIADB_ env vars..
INFO ==> Initializing mariadb database…
mkdir: cannot create directory '/bitnami/mariadb/data': Permission denied
INFO ==> Stopping mariadb…

Per similar question here, if you’re manually creating or reusing a PersistentVolume for MariaDB, you need to “chown -R 1001:1001 /pv-dir” on the PV directory, as the MariaDB container runs with userid 1001 and group 1001.

Next steps: From NGINX WordPress and MySQL running on Docker, to Kubernetes

This website running this blog has been running in Docker containers on a small-ish 4GB VPS for the past 9 months pretty much issue free. You can follow by journey to migrate this site to Docker in posts here and here.

Since I’ve been spending time recently getting up to speed with Kubernetes, the next logic step would be to deploy to a Kubernetes cluster, which would give me an opportunity to find out what it takes to run Kubernetes. I’ve looked at managed offerings on Google and AWS, but the cost for a few small personal projects is a little more than I want to spend.

I have a 8GB VPS ready to go, so far installed with Docker and Kubernetes running as a single node cluster, and I’m starting to plan my strategy for migrating to this new server. The first thing I’ve been thinking about is whether I should take my existing Docker images and just deploy to Kubernetes as is. Where I’ve got stuck so far is I don’t know enough about how to run NGINX with WordPress and MySQL in multiple pods, so I think I might install the WordPress Chart using Helm and for the time being not worry about how to do this myself.

The next thing I’ve been looking at is how to configure an Ingress to access different deployed services via different urls. I’ve been looking at setting up Traefik as the Ingress Controller to do this, and will be sharing a post about that config shortly. What I’m interested in is being able to deploy a number of different projects, including my WordPress site, and have them accessed via different urls, and it looks like Traefik will handle this fine.

I plan on writing some further posts as I make this transition over the next couple of weeks.