Category: Uncategorized

  • Oracle Database with Docker

    Running an Oracle database with Docker is a fairly simple task but I thought it would be useful to document the steps required for reference as I will likely need to refer to then in the future and to help others starting out on this path on how to run Oracle Database with Docker.

    Oracle Database with Docker

    Firstly Oracle only has 12c available via Docker Hub they had some legal grievances with each other a few years ago which means Oracle no longer updates the Docker Hub images but instead stores them here on GitHub. Another note is while the information on GitHub is great you still need to download the Oracle Database install .zip files from Oracle’s website yourself further if you plan on patching the Oracle database with docker you will need to have a valid Oracle Support licence and login to MOS.

    Firstly clone the Oracle Docker images to your local machine with git

    git clone https://github.com/oracle/docker-images.git

    After you have cloned the repo you will see there is a lot more available than just Oracle Database images but for this article its all we are concerned with, move to the OracleDatabase folder, then the SingleInstance folder and finally the 19.3.0 directory.

    cd ~/docker-images/OracleDatabase/SingleInstance/19.3.0

    With your downloaded Oracle Database install .zip copy in into your current 19.3.0 directory.

    cp $HOME/Downloads/LINUX.X64_193000_db_home.zip .

    If you plan on patching this Oracle Database with Docker in the future the default scripts remove some key directories within $ORACLE_HOME to reduce image size that will cause you to run into issues when trying to patch in the future, the fix is simple by default we choose to install the “SLIM” option we just need to update the Dockerfile within the 19.3.0 directory to read false.

    ARG SLIMMING=false

    Move back to the parent directory and run buildDockerImage.sh with a -v to specify database version in this case 19.3.0 and -e to indicate we want to use enterprise edition.

    cd ~/docker-images/OracleDatabase/SingleInstance

    ./buildDockerImage.sh -v 19.3.0 -e

    Depending on the resources you have on your machine will depend on how quickly the next part goes, I would say on average it will take 20-30min so go have coffee, you should come back to a Build Complete message. We have not successfully created an Oracle database image.

    To run the image use the following;

    docker run --name "oracle19.3" -p 1521:1521 -p 5500:5500 -e ORACLE_PDB=orapdb1 -e ORACLE_PWD=topsecretpass -e ORACLE_MEM=3000 -v /opt/oracle/oradata -d oracle/database:19.3.0-ee

    Where –name is the name of the docker image, ORACLE_PDB is the PDB name, ORACLE_PWD is the database password and ORACLE_MEM is the memory allocated to the DB. This first run of the docker image will go away and create the database so expect it to take some time during its first run.

    You can use sqldeveloper to connect to your PDB or connect to sqlplus via docker by logging directly into the docker image as per below

    docker exec -it oracle19.3 /bin/bash

    ps -ef |grep pmon

    . oraenv

    sqlplus / as sysdba

    Useful Docker commands

    Stop Docker Image

    docker container stop oracle19.3

    Start docker container

    docker container start oracle19.3

    Show running Docker containers

    docker ps

    List All Docker Images

    docker images

    Delete Docker Image

    docker image rm "image_id_here"

    And that’s all there is to it, it’s not a hard process and once you have been through it once or twice it becomes second nature. I’ve found great benefit running Oracle database with Docker, previously I had multiple Virtual machines with each database version on then now I just have Oracle database docker images that I can have running and access when I need them. If you enjoyed this article about Oracle database with Docker, please read my follow up on patching oracle database docker images here.

  • McPlant: Should we endorse it?

    Admission: I am not a vegan. I try to have a balanced diet of both meat and plant-based meals, but I have no desire to cut animal products from my diet completely.

    So should we endorse the McPlant?

    The rise in popularity of plant-based products has seen consumer consumption in the market rise at an unprecedented rate, looking at the Google search statistics searching for ‘veganism’ has increased a massive 590% in the last 5 years. And the Fast food chains have started to cotton on to this growing trend.

    Should we endorse the McPlant?

    We’ve had Greggs here in the UK launch with much success the vegan sausage roll and steak bake with further additions rumoured to be on the way. KFC released the vegan burger providing their iconic original flavour recipe on a meat-free alternative and now its time for the king of the fast-food industry McDonald’s to throw its stake into the game with the impending launch of the community dubbed McPlant.

    But aren’t these copy-cat, meat emulators creating a new problem?

    My issue with plant-based proteins is that imitate meat counterparts is that they are not really any more sustainable than the meat itself and I can only assume that this will make up the buld of the McPlant. If a time comes when the world has dramatically reduced its consumption of meat in favour of plant-based alternatives, large swathes of fertile land (possibly that which is currently used for cattle) would be required to grow the quantities needed to meet current consumption habits.

    Since the plant-based proteins are then refined to become something akin to meat, there is still that intensive process to create the plant-based substitute. I can’t see why we wouldn’t have all of the existing problems that a capitalist society breed, such as deforestation to make more cattle farming space. The problem would surely only evolve to become deforestation to make space for more crop growing farmland!

    Many of the arguments against the consumption of meat link back to animal cruelty and the practice of animals being bred and raised purely for slaughter. A shift to a plant-based alternative would help to address this of course, but bringing this article back to McDonald’s recent announcement of the McPlant, one has to ask how anyone who has chosen to ditch meat for animal cruelty reasons could then endorse a company like McDonald’s and any vegan product it aims to release such as the McPlant?

    McPlant: Should we endorse it?
    McPlant?

    The fast-food chain happens to be one of the largest producers of meat in the world, with many of their farms having featured in documentaries and news reports exposing the appalling, squalid conditions that animals are forced to live in. The same animals that go on to become our McNuggets or Big Macs. Surely any vegan cannot in good conscience endorse a vegan plant-based range of products such as the McPlant developed by one of the worlds biggest animal killers and can see the McPlant range for what it is – a marketing ploy and to tap into a new-ish emerging market.

    I have no issue with anyone who chooses to follow a plant-based diet. I think we should all take steps to reduce our meat intake. However, I also think that there must be a better solution to climate change than replacing animal meat with a plant-based substitute. As the supposedly superior race, it is arguably within our capabilities to find a truly sustainable solution.

    I believe the first step towards sustainable tranquillity would be for human beings to adopt a ‘grow what you need’ idealism. This could be as simple as utilizing back gardens, green spaces and/or allotments to grow our own produce to support what we and our immediate family required. Admittedly to reach this equilibrium would require a dramatic shift in current consumerism habits and a reduction in our want for things to be available to us instantly.

    But to eradicate our appetite for instant gratification, you need to break down capitalism.

    And therein lies the real problem, it’s much bigger than any McPlant burger wolfed down in 10 minutes …

    If you enjoied this article please see some of my othere here.

  • Ad-Blocking – Blocking Social Popups

    Ad-Blocking is good. Ads are annoying, they are generally all in your face. If you haven’t got an ad blocker running on your browser now is the time to correct that!

    Ad-Blocking setup

    Go download uBlock Origin for your browser of choice be it Chrome, Firefox or Safari, it’s one of the best on the market and it’s lightweight enough for you not to notice any difference in page load times, you might actually notice an improvement in load times as a bunch of the usual trash that was being loaded is now being blocked.

    Once you have an Ad-Blocking setup you soon discover that the net is quite a nice thing to look at. You can easily digest articles or sites that take your fancy without sensory overload when you’re not seeing the latest nonsense being punted by Wish or your favourite sites call to action for this week’s social injustice.

    One of the most annoying pop-ups for me that used to slip through my filters was bloggers or influencer pop-ups asking you to subscribe to their mailing list or other social media but alas, there is actually an option within uBlock Origin to block these. It’s not enabled by default and hidden away under the Annoyances section if uBlock, flipping it on gets me one step closer to an annoyance, distraction-free Internet with Ad-Blocking.

    To turn this setting on head into uBlock Origin’s settings and you will find a bunch of additional blocks that you can enable that are off by default, such as filter lists to block everything from Facebook but more specifically to turn off Social Media subscription messages or call to action pop-ups make sure you check to block Fanboy’s Annoyance and Fanboy’s Social.

    Ad-Blocking
    Ad-Blocking

    Give it a go, you might be surprised how clean the web actual looks without all the advertisements and calls to action.

    If you like this post please check out some of my others here.

  • Listening Faster – Audiobooks at x2 speed

    Over that last few weeks, I have begun listening faster than ever before than by listening to audiobooks on Audible at x2+ speed after each book is completed I increase the speed by 0.5 to find my max digestion speed. As it stands my current speed is at x2.15, I still have no problem taking in the information or understanding what’s being said. I’ll admit when I first started at x2.0 speed in my listening faster journey it sounds a bit strange but after 10-15min my brain had adapted and was processing the information normally. But why I hear you ask?

    Why start listening faster

    Consuming information and media is a fundamental part of life, whether your listening, watching or reading we all do it, it’s how we grow as a person via our learnings and life experiences, if you can consume and learn more, it can set you apart from another who is consuming only minimal amounts and not learning much at all.

    If I said to you that you could easily get through 5-6 audiobooks per month with only an hour a day of listening faster, would this not peak your interest? Over the course of a year, you would amass a total completed list of 72 audiobooks!

    How? Audiobooks are recorded for all ages and capabilities, the default playback speed has to suit everybody regardless of the speed they themselves can read or digest information.

    In a digital age of social media and instant gratification, the speed I can process information is much faster than the likes of my Dad, while he is tech-savvy enough not he’s not been around technology and the Internet throughout all of his teens and adult life like I have, he’s much more comfortable reading the paper than flicking through Reddit and news sites. Due to the bombardment of information, I am used to I can process information quicker, and more efficiently than my Dad can and no doubt the kids of today the true digital natives can do it better and listen faster than me.

    Finding your limits to listen faster is simple when you read a book to yourself or think to yourself what speed does your internal monologue go at? I am sure it’s much faster than you can read aloud.

    The aim of listening to audiobooks at an increased speed it to find where your limit is when your internal monologue can no longer keep up, once this point is reached drop the speed one or two points below this value and continue listening. Being at x2.15 at the moment I am having no trouble I can see myself reaching around x2.5 before I need to look at tapering off.

    Honestly give it a go, audiobooks, podcasts anything you just need to sit and listen to, its weird at first listening to someone speak in fast forward, by your mind soon adapts the situation and handles it as the new normal and once this happens yours well on your way to listening faster.

    If you liked this article on listening faster please have a look at some of my others here.