<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Apple Archives - Philipp Salvisberg&#039;s Blog</title>
	<atom:link href="https://www.salvis.com/blog/tag/apple/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.salvis.com/blog/tag/apple/</link>
	<description>Database-centric development</description>
	<lastBuildDate>Tue, 05 Nov 2024 10:15:27 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://www.salvis.com/blog/wp-content/uploads/2014/04/favicon.png</url>
	<title>Apple Archives - Philipp Salvisberg&#039;s Blog</title>
	<link>https://www.salvis.com/blog/tag/apple/</link>
	<width>32</width>
	<height>32</height>
</image> 
<atom:link rel="hub" href="https://pubsubhubbub.appspot.com"/>
<atom:link rel="hub" href="https://pubsubhubbub.superfeedr.com"/>
<atom:link rel="hub" href="https://websubhub.com/hub"/>
<atom:link rel="self" href="https://www.salvis.com/blog/tag/apple/feed/"/>
	<item>
		<title>Oracle Database 23c on a Mac with an M-Series Chip</title>
		<link>https://www.salvis.com/blog/2023/04/16/oracle-database-23c-on-a-mac-with-an-m-series-chip/</link>
					<comments>https://www.salvis.com/blog/2023/04/16/oracle-database-23c-on-a-mac-with-an-m-series-chip/#comments</comments>
		
		<dc:creator><![CDATA[Philipp Salvisberg]]></dc:creator>
		<pubDate>Sun, 16 Apr 2023 14:49:07 +0000</pubDate>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Docker]]></category>
		<category><![CDATA[Oracle 26ai]]></category>
		<guid isPermaLink="false">https://www.salvis.com/blog/?p=12304</guid>

					<description><![CDATA[<p>ARM Docker Images Now Available With the release of version 23.5 of Oracle Database 23ai, ARM builds are now available for Docker images. On the official Oracle Container Registry: And on Docker Hub provided by Gerald Venzl: This makes it very easy to use the Oracle Database on a Mac with an<span class="excerpt-hellip"> […]</span></p>
<p>The post <a href="https://www.salvis.com/blog/2023/04/16/oracle-database-23c-on-a-mac-with-an-m-series-chip/">Oracle Database 23c on a Mac with an M-Series Chip</a> appeared first on <a href="https://www.salvis.com/blog">Philipp Salvisberg&#039;s Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">ARM Docker Images Now Available</h2>



<p>With the release of version 23.5 of Oracle Database 23ai, ARM builds are now available for Docker images. </p>



<p>On the official <a href="https://container-registry.oracle.com/">Oracle Container Registry</a>:</p>



<figure class="wp-block-image size-full"><a href="https://www.salvis.com/blog/wp-content/uploads/2023/04/image.png"><img fetchpriority="high" decoding="async" width="989" height="200" src="https://www.salvis.com/blog/wp-content/uploads/2023/04/image.png" alt="" class="wp-image-13723" srcset="https://www.salvis.com/blog/wp-content/uploads/2023/04/image.png 989w, https://www.salvis.com/blog/wp-content/uploads/2023/04/image-300x61.png 300w, https://www.salvis.com/blog/wp-content/uploads/2023/04/image-768x155.png 768w, https://www.salvis.com/blog/wp-content/uploads/2023/04/image-150x30.png 150w, https://www.salvis.com/blog/wp-content/uploads/2023/04/image-480x97.png 480w" sizes="(max-width:767px) 480px, (max-width:989px) 100vw, 989px" /></a></figure>



<p>And on <a href="https://hub.docker.com/r/gvenzl/oracle-free/tags?name=arm">Docker Hub</a> provided by Gerald Venzl:</p>



<figure class="wp-block-image size-full"><a href="https://www.salvis.com/blog/wp-content/uploads/2023/04/image-1.png"><img decoding="async" width="946" height="404" src="https://www.salvis.com/blog/wp-content/uploads/2023/04/image-1.png" alt="" class="wp-image-13724" srcset="https://www.salvis.com/blog/wp-content/uploads/2023/04/image-1.png 946w, https://www.salvis.com/blog/wp-content/uploads/2023/04/image-1-300x128.png 300w, https://www.salvis.com/blog/wp-content/uploads/2023/04/image-1-768x328.png 768w, https://www.salvis.com/blog/wp-content/uploads/2023/04/image-1-150x64.png 150w, https://www.salvis.com/blog/wp-content/uploads/2023/04/image-1-480x205.png 480w" sizes="(max-width:767px) 480px, (max-width:946px) 100vw, 946px" /></a></figure>



<p>This makes it very easy to use the Oracle Database on a Mac with an Apple silicon chip.</p>



<h2 class="wp-block-heading">Starting Position</h2>



<p>I got my MacBook Pro 16&#8243; with an Apple M1 Max chip with 10 cores, 64 GB RAM and 4 TB disk in November 2021. At that time, the M1 chip had already been on the market for a year and I knew that there were problems when running virtual machines or Docker containers with the Intel x86_64 architecture. Most of my colleagues decided to go with a database instance in the cloud. However, I like the ability to develop offline and I often need an Oracle Database. And disk space is not an issue.</p>



<p>My solution was to <a href="https://twitter.com/phsalvisberg/status/1463365470984232960?s=20">run Windows on ARM in Parallels Desktop and install the Oracle Database</a> there. Microsoft did a tremendous job running Intel-based software under Windows on ARM. As far as I remember I did not experience a single crash. And the performance was similar to the Oracle Databases that ran in a Docker container on my Mac mini Server with a 2.3 GHz Intel Quad-Core i7.</p>



<p>I tried other solutions based on <a href="https://www.qemu.org/">QEMU</a> like <a href="https://mac.getutm.app/">UTM</a>, but the performance was unbearable slow. So, I lived with my Oracle Database under Windows. Happily until 4th April 2023. The release date of Oracle Database 23c Free.</p>



<h2 class="wp-block-heading">Oracle Database 23c Free</h2>



<p>The Oracle Database 23c Free is available as Linux RPM, VirtualBox VM or Docker image. There are two distributions for the Docker image:</p>



<ul class="wp-block-list">
<li>Oracle&#8217;s official image (<a href="https://container-registry.oracle.com/">container-registry.oracle.com/database/free</a>)</li>



<li>Gerald Venzl&#8217;s images (<a href="https://hub.docker.com/r/gvenzl/oracle-free">gvenzl/oracle-free</a>) in the flavours <code>thin</code>, <code>regular</code>, <code>full</code>&nbsp;and <code>faststart</code></li>
</ul>



<p>Gerald and the team at Oracle managed to allow us to download Oracle software without forcing us to log in and accept some license agreements. This is super cool, especially in CI environments.</p>



<p>Gerald mentions also the limitation regarding the <a href="https://github.com/gvenzl/oci-oracle-free#oracle-database-free-on-apple-m-chips">Oracle Database Free on Apple M chips</a> and points to <a href="https://github.com/abiosoft/colima">Colima</a>. I have not used Colima before, however, it sounds like the way to go until Oracle releases their flagship database system for <a href="https://en.wikipedia.org/wiki/ARM_architecture_family">ARM</a>.</p>



<h2 class="wp-block-heading">What is Colima?</h2>



<p>Colima provides an alternative context for Docker containers. Docker containers do not run natively on macOS. Instead, the context provides a virtual machine and the containers run there. The idea is that we do not need to know that there is a VM behind the scenes. Mostly.</p>



<p>Docker Desktop provides already a VM. Why do we need an alternative or an additional VM? Well, I see the following reasons:</p>



<ul class="wp-block-list">
<li>Firstly, you can use Colima as a replacement for Docker Desktop.</li>



<li>Secondly, you have more control over the configuration of the virtual machine, and this effectively allows you to run an Oracle Database in a Docker container on a macOS machine with an Apple M-Series chip.</li>
</ul>



<p>It&#8217;s important to note, that Colima can run side-by-side with Docker Desktop. You can change the current context via the <code>docker context</code> command. However, Docker Desktop 4.17.0 is not able to see &#8220;foreign&#8221; contexts. This means when you work with Colima you do that from the command line.</p>



<h2 class="wp-block-heading">Prerequisites</h2>



<p>For the next steps, you will need the following:</p>



<ul class="wp-block-list">
<li>A Mac with an M-Series chip,</li>



<li>with macOS Ventura 13.3.1 or newer,</li>



<li>Internet access,</li>



<li>and the ability to work in a terminal window and execute <code>sudo</code> commands.</li>
</ul>



<p>So, let&#8217;s get started.</p>



<h2 class="wp-block-heading">Step 1 &#8211; Install Homebrew</h2>



<p>Run the following command in a terminal window, if you have not installed <a href="https://brew.sh/">homebrew</a> already:</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2b2b2b;color:#c7c7c7">1a) Install homebrew</span><span role="button" tabindex="0" data-code="/bin/bash -c &quot;$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)&quot;" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #DCDCAA">/bin/bash</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">-c</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">&quot;$(</span><span style="color: #DCDCAA">curl</span><span style="color: #CE9178"> </span><span style="color: #569CD6">-fsSL</span><span style="color: #CE9178"> https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)&quot;</span></span></code></pre></div>



<p>If you already have installed homebrew, then update your installation as follows:</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2b2b2b;color:#c7c7c7">1b) Update homebrew</span><span role="button" tabindex="0" data-code="brew update" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #DCDCAA">brew</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">update</span></span></code></pre></div>



<p>You might be asked to upgrade outdated formulae. &#8211; You know what to do.</p>



<h2 class="wp-block-heading">Step 2 &#8211; Install Colima</h2>



<p>We install the stable version of Colima via homebrew. See the <a href="https://github.com/abiosoft/colima/blob/main/docs/INSTALL.md">installation guide</a> for all options.</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2b2b2b;color:#c7c7c7">2) Install Colima</span><span role="button" tabindex="0" data-code="brew install colima" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #DCDCAA">brew</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">install</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">colima</span></span></code></pre></div>



<h2 class="wp-block-heading">Step 3 &#8211; Create Colima VM</h2>



<p>Now we can start Colima. The initial start creates the virtual machine. We pass a minimal set of parameters to override the defaults where necessary.</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);--cbp-line-highlight-color:rgba(234, 191, 191, 0.2);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2b2b2b;color:#c7c7c7">3) Create Colima VM</span><span role="button" tabindex="0" data-code="colima start \
    --arch x86_64 \
    --vm-type=vz \
    --vz-rosetta \
    --mount-type=virtiofs \
    --memory 4" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #DCDCAA">colima</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">start</span><span style="color: #D4D4D4"> </span><span style="color: #D7BA7D">\</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #569CD6">--arch</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">x86_64</span><span style="color: #D4D4D4"> </span><span style="color: #D7BA7D">\</span></span>
<span class="line cbp-line-highlight"><span style="color: #D4D4D4">    </span><span style="color: #569CD6">--vm-type=vz</span><span style="color: #D4D4D4"> </span><span style="color: #D7BA7D">\</span></span>
<span class="line cbp-line-highlight"><span style="color: #D4D4D4">    </span><span style="color: #569CD6">--vz-rosetta</span><span style="color: #D4D4D4"> </span><span style="color: #D7BA7D">\</span></span>
<span class="line cbp-line-highlight"><span style="color: #D4D4D4">    </span><span style="color: #569CD6">--mount-type=virtiofs</span><span style="color: #D4D4D4"> </span><span style="color: #D7BA7D">\</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #569CD6">--memory</span><span style="color: #D4D4D4"> </span><span style="color: #B5CEA8">4</span></span></code></pre></div>



<p>This command produces a VM with 2 CPUs, 4 GB RAM and 60 GB disk space. The architecture is x86_64. To improve the performance we use the virtualization framework of macOS 13 <code>vz</code>, enable Rosetta 2 and use the macOS-specific volume mount driver <code>virtiofs</code>.</p>



<p>The VM is created in <code>$HOME/.lima</code>. The configuration of the VM is stored in <code>$HOME/.colima/default/colima.yaml</code>. Most of the settings can be changed, but require a restart of the VM (via <code>colima restart</code> or <code>colima stop</code> followed by <code>colima start</code>).</p>



<p>Starting Colima changes the context to <code>colima</code> and stopping it changes it back to <code>default</code>. Use <code>docker context use</code> to change the context.</p>



<p><em><span class="highlight highlight-" style="background-color:Lemonchiffon;color:black;">Updated on 2023-04-19:</span>
 The <code>x86_64</code> architecture prohibits the use of Rosetta 2. Colima falls back silently to QEMU. Providing `<span class="s1">&#8211;arch aarch64` enables Rosetta 2. However, it will not be possible to start an Oracle Database. You will get the same errors as with the default Docker context. As a result, you do not need to pass the highlighted parameters.</span></em></p>



<h2 class="wp-block-heading">Step 4 &#8211; Create 23c Container</h2>



<p>We want to create a container with a volume mapped to a local directory. Due to various permission issues, it is not that simple to achieve that directly. It&#8217;s easier if we create an internal Docker volume (within the VM) first.</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2b2b2b;color:#c7c7c7">4a) Create 23c Container</span><span role="button" tabindex="0" data-code="docker run -d \
    --name 23c \
    -p 1522:1521 \
    -v 23c-data:/opt/oracle/oradata \
    container-registry.oracle.com/database/free" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #DCDCAA">docker</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">run</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">-d</span><span style="color: #D4D4D4"> </span><span style="color: #D7BA7D">\</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #569CD6">--name</span><span style="color: #D4D4D4"> </span><span style="color: #B5CEA8">23</span><span style="color: #CE9178">c</span><span style="color: #D4D4D4"> </span><span style="color: #D7BA7D">\</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #569CD6">-p</span><span style="color: #D4D4D4"> </span><span style="color: #B5CEA8">1522</span><span style="color: #CE9178">:1521</span><span style="color: #D4D4D4"> </span><span style="color: #D7BA7D">\</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #569CD6">-v</span><span style="color: #D4D4D4"> </span><span style="color: #B5CEA8">23</span><span style="color: #CE9178">c-data:/opt/oracle/oradata</span><span style="color: #D4D4D4"> </span><span style="color: #D7BA7D">\</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #CE9178">container-registry.oracle.com/database/free</span></span></code></pre></div>



<p>We use Oracle&#8217;s distribution of the image. It will be pulled automatically. The volume <code>23c-data</code> is also created automatically.</p>



<p>To monitor the console output we run the following command:</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2b2b2b;color:#c7c7c7">4b) Monitor console output</span><span role="button" tabindex="0" data-code="docker logs -tf 23c" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #DCDCAA">docker</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">logs</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">-tf</span><span style="color: #D4D4D4"> </span><span style="color: #B5CEA8">23</span><span style="color: #CE9178">c</span></span></code></pre></div>



<p>Here&#8217;s the log output with timestamps. The database was up and running after 38 seconds.</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2b2b2b;color:#c7c7c7">4c) Console Output</span><span role="button" tabindex="0" data-code="2023-04-16T10:16:43.392545000Z Starting Oracle Net Listener.
2023-04-16T10:16:44.057130000Z Oracle Net Listener started.
2023-04-16T10:16:44.057316000Z Starting Oracle Database instance FREE.
2023-04-16T10:17:19.544454000Z Oracle Database instance FREE started.
2023-04-16T10:17:19.547911000Z 
2023-04-16T10:17:19.705193000Z The Oracle base remains unchanged with value /opt/oracle
2023-04-16T10:17:21.584419000Z #########################
2023-04-16T10:17:21.584722000Z DATABASE IS READY TO USE!
2023-04-16T10:17:21.584981000Z #########################
2023-04-16T10:17:21.669542000Z The following output is now a tail of the alert.log:
2023-04-16T10:17:21.720236000Z FREEPDB1(3):Opening pdb with Resource Manager plan: DEFAULT_PLAN
2023-04-16T10:17:21.720480000Z 2023-04-16T10:17:17.657677+00:00
2023-04-16T10:17:21.720530000Z Completed: Pluggable database FREEPDB1 opened read write 
2023-04-16T10:17:21.720563000Z Completed: ALTER DATABASE OPEN
2023-04-16T10:17:21.720592000Z 2023-04-16T10:17:19.761876+00:00
2023-04-16T10:17:21.720620000Z ===========================================================
2023-04-16T10:17:21.720647000Z Dumping current patch information
2023-04-16T10:17:21.720673000Z ===========================================================
2023-04-16T10:17:21.720698000Z No patches have been applied
2023-04-16T10:17:21.720722000Z ===========================================================" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #D4D4D4">2023-04-16T10:16:43.392545000Z Starting Oracle Net Listener.</span></span>
<span class="line"><span style="color: #D4D4D4">2023-04-16T10:16:44.057130000Z Oracle Net Listener started.</span></span>
<span class="line"><span style="color: #D4D4D4">2023-04-16T10:16:44.057316000Z Starting Oracle Database instance FREE.</span></span>
<span class="line"><span style="color: #D4D4D4">2023-04-16T10:17:19.544454000Z Oracle Database instance FREE started.</span></span>
<span class="line"><span style="color: #D4D4D4">2023-04-16T10:17:19.547911000Z </span></span>
<span class="line"><span style="color: #D4D4D4">2023-04-16T10:17:19.705193000Z The Oracle base remains unchanged with value /opt/oracle</span></span>
<span class="line"><span style="color: #D4D4D4">2023-04-16T10:17:21.584419000Z #########################</span></span>
<span class="line"><span style="color: #D4D4D4">2023-04-16T10:17:21.584722000Z DATABASE IS READY TO USE!</span></span>
<span class="line"><span style="color: #D4D4D4">2023-04-16T10:17:21.584981000Z #########################</span></span>
<span class="line"><span style="color: #D4D4D4">2023-04-16T10:17:21.669542000Z The following output is now a tail of the alert.log:</span></span>
<span class="line"><span style="color: #D4D4D4">2023-04-16T10:17:21.720236000Z FREEPDB1(3):Opening pdb with Resource Manager plan: DEFAULT_PLAN</span></span>
<span class="line"><span style="color: #D4D4D4">2023-04-16T10:17:21.720480000Z 2023-04-16T10:17:17.657677+00:00</span></span>
<span class="line"><span style="color: #D4D4D4">2023-04-16T10:17:21.720530000Z Completed: Pluggable database FREEPDB1 opened read write </span></span>
<span class="line"><span style="color: #D4D4D4">2023-04-16T10:17:21.720563000Z Completed: ALTER DATABASE OPEN</span></span>
<span class="line"><span style="color: #D4D4D4">2023-04-16T10:17:21.720592000Z 2023-04-16T10:17:19.761876+00:00</span></span>
<span class="line"><span style="color: #D4D4D4">2023-04-16T10:17:21.720620000Z ===========================================================</span></span>
<span class="line"><span style="color: #D4D4D4">2023-04-16T10:17:21.720647000Z Dumping current patch information</span></span>
<span class="line"><span style="color: #D4D4D4">2023-04-16T10:17:21.720673000Z ===========================================================</span></span>
<span class="line"><span style="color: #D4D4D4">2023-04-16T10:17:21.720698000Z No patches have been applied</span></span>
<span class="line"><span style="color: #D4D4D4">2023-04-16T10:17:21.720722000Z ===========================================================</span></span></code></pre></div>



<p>We can press Ctrl-C once we see this output.</p>



<h2 class="wp-block-heading">Step 5 &#8211; Change Passwords</h2>



<p>The database was created with random passwords for <code>SYS</code>, <code>SYSTEM</code> and <code>PDBADMIN</code>. To change them we run the following:</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2b2b2b;color:#c7c7c7">5a) Change passwords</span><span role="button" tabindex="0" data-code="docker exec -it 23c ./setPassword.sh oracle" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #DCDCAA">docker</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">exec</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">-it</span><span style="color: #D4D4D4"> </span><span style="color: #B5CEA8">23</span><span style="color: #CE9178">c</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">./setPassword.sh</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">oracle</span></span></code></pre></div>



<p>As result, we expect the following SQL*Plus console output:</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2b2b2b;color:#c7c7c7">5b) Console output</span><span role="button" tabindex="0" data-code="The Oracle base remains unchanged with value /opt/oracle

SQL*Plus: Release 23.0.0.0.0 - Developer-Release on Sun Apr 16 10:18:57 2023
Version 23.2.0.0.0

Copyright (c) 1982, 2023, Oracle.  All rights reserved.


Connected to:
Oracle Database 23c Free, Release 23.0.0.0.0 - Developer-Release
Version 23.2.0.0.0

SQL&gt; 
User altered.

SQL&gt; 
User altered.

SQL&gt; 
Session altered.

SQL&gt; 
User altered.

SQL&gt; Disconnected from Oracle Database 23c Free, Release 23.0.0.0.0 - Developer-Release
Version 23.2.0.0.0" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #D4D4D4">The Oracle base remains unchanged with value /opt/oracle</span></span>
<span class="line"><span style="color: #D4D4D4"></span></span>
<span class="line"><span style="color: #D4D4D4">SQL*Plus: Release 23.0.0.0.0 - Developer-Release on Sun Apr 16 10:18:57 2023</span></span>
<span class="line"><span style="color: #D4D4D4">Version 23.2.0.0.0</span></span>
<span class="line"><span style="color: #D4D4D4"></span></span>
<span class="line"><span style="color: #D4D4D4">Copyright (c) 1982, 2023, Oracle.  All rights reserved.</span></span>
<span class="line"><span style="color: #D4D4D4"></span></span>
<span class="line"><span style="color: #D4D4D4"></span></span>
<span class="line"><span style="color: #D4D4D4">Connected to:</span></span>
<span class="line"><span style="color: #D4D4D4">Oracle Database 23c Free, Release 23.0.0.0.0 - Developer-Release</span></span>
<span class="line"><span style="color: #D4D4D4">Version 23.2.0.0.0</span></span>
<span class="line"><span style="color: #D4D4D4"></span></span>
<span class="line"><span style="color: #D4D4D4">SQL&gt; </span></span>
<span class="line"><span style="color: #D4D4D4">User altered.</span></span>
<span class="line"><span style="color: #D4D4D4"></span></span>
<span class="line"><span style="color: #D4D4D4">SQL&gt; </span></span>
<span class="line"><span style="color: #D4D4D4">User altered.</span></span>
<span class="line"><span style="color: #D4D4D4"></span></span>
<span class="line"><span style="color: #D4D4D4">SQL&gt; </span></span>
<span class="line"><span style="color: #D4D4D4">Session altered.</span></span>
<span class="line"><span style="color: #D4D4D4"></span></span>
<span class="line"><span style="color: #D4D4D4">SQL&gt; </span></span>
<span class="line"><span style="color: #D4D4D4">User altered.</span></span>
<span class="line"><span style="color: #D4D4D4"></span></span>
<span class="line"><span style="color: #D4D4D4">SQL&gt; Disconnected from Oracle Database 23c Free, Release 23.0.0.0.0 - Developer-Release</span></span>
<span class="line"><span style="color: #D4D4D4">Version 23.2.0.0.0</span></span></code></pre></div>



<p>That&#8217;s it if you are happy with a Docker volume.</p>



<p>If you&#8217;d like the volume to be mapped to a local directory on your Mac, then read on.</p>



<h2 class="wp-block-heading">Step 6 &#8211; Export Volume</h2>



<p>There are several ways to export a volume. The following script uses a helper container to access the volume and copy the content to the local directory which we want to use in the future as the replacement for the Docker volume.</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2b2b2b;color:#c7c7c7">6) Export Volume</span><span role="button" tabindex="0" data-code="docker stop 23c
mkdir -p $HOME/docker/23c-data
docker run --rm \
    -v 23c-data:/source \
    -v $HOME/docker:/target \
    ubuntu tar czvf /target/23c-data.tar.gz /source
sudo tar xvpfz $HOME/docker/23c-data.tar.gz \
    --strip-components=1 -C $HOME/docker/23c-data
" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #DCDCAA">docker</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">stop</span><span style="color: #D4D4D4"> </span><span style="color: #B5CEA8">23</span><span style="color: #CE9178">c</span></span>
<span class="line"><span style="color: #DCDCAA">mkdir</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">-p</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">$HOME</span><span style="color: #CE9178">/docker/23c-data</span></span>
<span class="line"><span style="color: #DCDCAA">docker</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">run</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">--rm</span><span style="color: #D4D4D4"> </span><span style="color: #D7BA7D">\</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #569CD6">-v</span><span style="color: #D4D4D4"> </span><span style="color: #B5CEA8">23</span><span style="color: #CE9178">c-data:/source</span><span style="color: #D4D4D4"> </span><span style="color: #D7BA7D">\</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #569CD6">-v</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">$HOME</span><span style="color: #CE9178">/docker:/target</span><span style="color: #D4D4D4"> </span><span style="color: #D7BA7D">\</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #CE9178">ubuntu</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">tar</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">czvf</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">/target/23c-data.tar.gz</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">/source</span></span>
<span class="line"><span style="color: #DCDCAA">sudo</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">tar</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">xvpfz</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">$HOME</span><span style="color: #CE9178">/docker/23c-data.tar.gz</span><span style="color: #D4D4D4"> </span><span style="color: #D7BA7D">\</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #569CD6">--strip-components=1</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">-C</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">$HOME</span><span style="color: #CE9178">/docker/23c-data</span></span>
<span class="line"></span></code></pre></div>



<h2 class="wp-block-heading">Step 7 &#8211; Change Permissions</h2>



<p>We used <code>sudo tar xvpfz...</code> previously to ensure that we can create all files in the target directory with the same permissions as in the original Docker volume. However, this does not seem to be enough.</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2b2b2b;color:#c7c7c7">7a) Change Permissions</span><span role="button" tabindex="0" data-code="sudo chown 54321:54321 $HOME/docker/23c-data
sudo chmod -R 777 $HOME/docker/23c-data
sudo chmod 4640 $HOME/docker/23c-data/dbconfig/FREE/orapwFREE" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #DCDCAA">sudo</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">chown</span><span style="color: #D4D4D4"> </span><span style="color: #B5CEA8">54321</span><span style="color: #CE9178">:54321</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">$HOME</span><span style="color: #CE9178">/docker/23c-data</span></span>
<span class="line"><span style="color: #DCDCAA">sudo</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">chmod</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">-R</span><span style="color: #D4D4D4"> </span><span style="color: #B5CEA8">777</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">$HOME</span><span style="color: #CE9178">/docker/23c-data</span></span>
<span class="line"><span style="color: #DCDCAA">sudo</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">chmod</span><span style="color: #D4D4D4"> </span><span style="color: #B5CEA8">4640</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">$HOME</span><span style="color: #CE9178">/docker/23c-data/dbconfig/FREE/orapwFREE</span></span></code></pre></div>



<p><code>orapwFREE</code> is the password file. It needs restrictive permission to work.</p>



<p>If you&#8217;d like to have the user <code>oracle</code> and the group <code>oinstall</code> also on your Mac, then you can run the following:</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2b2b2b;color:#c7c7c7">7b) Create group oinstall and user oracle</span><span role="button" tabindex="0" data-code="sudo dscl . -create /Groups/oinstall
sudo dscl . -create /Groups/oinstall name oinstall
sudo dscl . -create /Groups/oinstall gid 54321
sudo dscl . -create /Users/oracle
sudo dscl . -create /Users/oracle name oracle
sudo dscl . -create /Users/oracle uid 54321
sudo dscl . -create /Users/oracle PrimaryGroupID 54321
sudo dseditgroup -o edit -a oracle -t user oinstall
sudo dseditgroup -o edit -a $USER -t user oinstall
sudo dscl . -create /Groups/oinstall GroupMembership oracle
sudo dscl . -create /Groups/oinstall GroupMembership $USER" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #DCDCAA">sudo</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">dscl</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">.</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">-create</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">/Groups/oinstall</span></span>
<span class="line"><span style="color: #DCDCAA">sudo</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">dscl</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">.</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">-create</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">/Groups/oinstall</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">name</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">oinstall</span></span>
<span class="line"><span style="color: #DCDCAA">sudo</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">dscl</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">.</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">-create</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">/Groups/oinstall</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">gid</span><span style="color: #D4D4D4"> </span><span style="color: #B5CEA8">54321</span></span>
<span class="line"><span style="color: #DCDCAA">sudo</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">dscl</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">.</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">-create</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">/Users/oracle</span></span>
<span class="line"><span style="color: #DCDCAA">sudo</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">dscl</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">.</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">-create</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">/Users/oracle</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">name</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">oracle</span></span>
<span class="line"><span style="color: #DCDCAA">sudo</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">dscl</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">.</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">-create</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">/Users/oracle</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">uid</span><span style="color: #D4D4D4"> </span><span style="color: #B5CEA8">54321</span></span>
<span class="line"><span style="color: #DCDCAA">sudo</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">dscl</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">.</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">-create</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">/Users/oracle</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">PrimaryGroupID</span><span style="color: #D4D4D4"> </span><span style="color: #B5CEA8">54321</span></span>
<span class="line"><span style="color: #DCDCAA">sudo</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">dseditgroup</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">-o</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">edit</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">-a</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">oracle</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">-t</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">user</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">oinstall</span></span>
<span class="line"><span style="color: #DCDCAA">sudo</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">dseditgroup</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">-o</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">edit</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">-a</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">$USER</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">-t</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">user</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">oinstall</span></span>
<span class="line"><span style="color: #DCDCAA">sudo</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">dscl</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">.</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">-create</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">/Groups/oinstall</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">GroupMembership</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">oracle</span></span>
<span class="line"><span style="color: #DCDCAA">sudo</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">dscl</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">.</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">-create</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">/Groups/oinstall</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">GroupMembership</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">$USER</span></span></code></pre></div>



<p>After that the output of <code>cd $HOME/docker;ls -lR 23c-data</code> should look similar to this:</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2b2b2b;color:#c7c7c7">7c) Volume privileges</span><span role="button" tabindex="0" data-code="total 0
drwxrwxrwx  15 oracle  oinstall  480 Apr 16 12:16 FREE
drwxrwxrwx   3 oracle  oinstall   96 Apr 16 12:16 dbconfig

23c-data/FREE:
total 4928904
drwxrwxrwx  7 oracle  oinstall         224 Apr 16 12:16 FREEPDB1
-rwxrwxrwx  1 oracle  oinstall    18759680 Apr 16 12:19 control01.ctl
-rwxrwxrwx  1 oracle  oinstall    18759680 Mar 28 15:28 control02.ctl
drwxrwxrwx  6 oracle  oinstall         192 Apr 16 12:16 pdbseed
-rwxrwxrwx  1 oracle  oinstall   209715712 Apr 16 12:16 redo01.log
-rwxrwxrwx  1 oracle  oinstall   209715712 Apr 16 12:19 redo02.log
-rwxrwxrwx  1 oracle  oinstall   209715712 Apr 16 12:16 redo03.log
-rwxrwxrwx  1 oracle  oinstall   576724992 Apr 16 12:19 sysaux01.dbf
-rwxrwxrwx  1 oracle  oinstall  1216356352 Apr 16 12:19 system01.dbf
-rwxrwxrwx  1 oracle  oinstall    20979712 Mar 28 15:24 temp01.dbf
-rwxrwxrwx  1 oracle  oinstall    26222592 Apr 16 12:19 undotbs01.dbf
-rwxrwxrwx  1 oracle  oinstall     5251072 Apr 16 12:19 users01.dbf

23c-data/FREE/FREEPDB1:
total 1464400
-rwxrwxrwx  1 oracle  oinstall  325066752 Apr 16 12:19 sysaux01.dbf
-rwxrwxrwx  1 oracle  oinstall  293609472 Apr 16 12:19 system01.dbf
-rwxrwxrwx  1 oracle  oinstall   20979712 Apr 16 12:17 temp01.dbf
-rwxrwxrwx  1 oracle  oinstall  104865792 Apr 16 12:19 undotbs01.dbf
-rwxrwxrwx  1 oracle  oinstall    5251072 Apr 16 12:19 users01.dbf

23c-data/FREE/pdbseed:
total 1454144
-rwxrwxrwx  1 oracle  oinstall  325066752 Mar 28 15:27 sysaux01.dbf
-rwxrwxrwx  1 oracle  oinstall  293609472 Mar 28 15:27 system01.dbf
-rwxrwxrwx  1 oracle  oinstall   20979712 Mar 28 15:25 temp01.dbf
-rwxrwxrwx  1 oracle  oinstall  104865792 Mar 28 15:27 undotbs01.dbf

23c-data/dbconfig:
total 0
drwxrwxrwx  8 oracle  oinstall  256 Apr 16 12:16 FREE

23c-data/dbconfig/FREE:
total 48
-rwxrwxrwx  1 oracle  oinstall   449 Mar 28 15:28 listener.ora
-rwSr-----  1 oracle  oinstall  2048 Apr 16 12:19 orapwFREE
-rwxrwxrwx  1 oracle  oinstall   779 Mar 28 15:28 oratab
-rwxrwxrwx  1 oracle  oinstall  3584 Apr 16 12:17 spfileFREE.ora
-rwxrwxrwx  1 oracle  oinstall    69 Mar 28 15:28 sqlnet.ora
-rwxrwxrwx  1 oracle  oinstall   690 Mar 28 15:28 tnsnames.ora" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #D4D4D4">total 0</span></span>
<span class="line"><span style="color: #D4D4D4">drwxrwxrwx  15 oracle  oinstall  480 Apr 16 12:16 FREE</span></span>
<span class="line"><span style="color: #D4D4D4">drwxrwxrwx   3 oracle  oinstall   96 Apr 16 12:16 dbconfig</span></span>
<span class="line"><span style="color: #D4D4D4"></span></span>
<span class="line"><span style="color: #D4D4D4">23c-data/FREE:</span></span>
<span class="line"><span style="color: #D4D4D4">total 4928904</span></span>
<span class="line"><span style="color: #D4D4D4">drwxrwxrwx  7 oracle  oinstall         224 Apr 16 12:16 FREEPDB1</span></span>
<span class="line"><span style="color: #D4D4D4">-rwxrwxrwx  1 oracle  oinstall    18759680 Apr 16 12:19 control01.ctl</span></span>
<span class="line"><span style="color: #D4D4D4">-rwxrwxrwx  1 oracle  oinstall    18759680 Mar 28 15:28 control02.ctl</span></span>
<span class="line"><span style="color: #D4D4D4">drwxrwxrwx  6 oracle  oinstall         192 Apr 16 12:16 pdbseed</span></span>
<span class="line"><span style="color: #D4D4D4">-rwxrwxrwx  1 oracle  oinstall   209715712 Apr 16 12:16 redo01.log</span></span>
<span class="line"><span style="color: #D4D4D4">-rwxrwxrwx  1 oracle  oinstall   209715712 Apr 16 12:19 redo02.log</span></span>
<span class="line"><span style="color: #D4D4D4">-rwxrwxrwx  1 oracle  oinstall   209715712 Apr 16 12:16 redo03.log</span></span>
<span class="line"><span style="color: #D4D4D4">-rwxrwxrwx  1 oracle  oinstall   576724992 Apr 16 12:19 sysaux01.dbf</span></span>
<span class="line"><span style="color: #D4D4D4">-rwxrwxrwx  1 oracle  oinstall  1216356352 Apr 16 12:19 system01.dbf</span></span>
<span class="line"><span style="color: #D4D4D4">-rwxrwxrwx  1 oracle  oinstall    20979712 Mar 28 15:24 temp01.dbf</span></span>
<span class="line"><span style="color: #D4D4D4">-rwxrwxrwx  1 oracle  oinstall    26222592 Apr 16 12:19 undotbs01.dbf</span></span>
<span class="line"><span style="color: #D4D4D4">-rwxrwxrwx  1 oracle  oinstall     5251072 Apr 16 12:19 users01.dbf</span></span>
<span class="line"><span style="color: #D4D4D4"></span></span>
<span class="line"><span style="color: #D4D4D4">23c-data/FREE/FREEPDB1:</span></span>
<span class="line"><span style="color: #D4D4D4">total 1464400</span></span>
<span class="line"><span style="color: #D4D4D4">-rwxrwxrwx  1 oracle  oinstall  325066752 Apr 16 12:19 sysaux01.dbf</span></span>
<span class="line"><span style="color: #D4D4D4">-rwxrwxrwx  1 oracle  oinstall  293609472 Apr 16 12:19 system01.dbf</span></span>
<span class="line"><span style="color: #D4D4D4">-rwxrwxrwx  1 oracle  oinstall   20979712 Apr 16 12:17 temp01.dbf</span></span>
<span class="line"><span style="color: #D4D4D4">-rwxrwxrwx  1 oracle  oinstall  104865792 Apr 16 12:19 undotbs01.dbf</span></span>
<span class="line"><span style="color: #D4D4D4">-rwxrwxrwx  1 oracle  oinstall    5251072 Apr 16 12:19 users01.dbf</span></span>
<span class="line"><span style="color: #D4D4D4"></span></span>
<span class="line"><span style="color: #D4D4D4">23c-data/FREE/pdbseed:</span></span>
<span class="line"><span style="color: #D4D4D4">total 1454144</span></span>
<span class="line"><span style="color: #D4D4D4">-rwxrwxrwx  1 oracle  oinstall  325066752 Mar 28 15:27 sysaux01.dbf</span></span>
<span class="line"><span style="color: #D4D4D4">-rwxrwxrwx  1 oracle  oinstall  293609472 Mar 28 15:27 system01.dbf</span></span>
<span class="line"><span style="color: #D4D4D4">-rwxrwxrwx  1 oracle  oinstall   20979712 Mar 28 15:25 temp01.dbf</span></span>
<span class="line"><span style="color: #D4D4D4">-rwxrwxrwx  1 oracle  oinstall  104865792 Mar 28 15:27 undotbs01.dbf</span></span>
<span class="line"><span style="color: #D4D4D4"></span></span>
<span class="line"><span style="color: #D4D4D4">23c-data/dbconfig:</span></span>
<span class="line"><span style="color: #D4D4D4">total 0</span></span>
<span class="line"><span style="color: #D4D4D4">drwxrwxrwx  8 oracle  oinstall  256 Apr 16 12:16 FREE</span></span>
<span class="line"><span style="color: #D4D4D4"></span></span>
<span class="line"><span style="color: #D4D4D4">23c-data/dbconfig/FREE:</span></span>
<span class="line"><span style="color: #D4D4D4">total 48</span></span>
<span class="line"><span style="color: #D4D4D4">-rwxrwxrwx  1 oracle  oinstall   449 Mar 28 15:28 listener.ora</span></span>
<span class="line"><span style="color: #D4D4D4">-rwSr-----  1 oracle  oinstall  2048 Apr 16 12:19 orapwFREE</span></span>
<span class="line"><span style="color: #D4D4D4">-rwxrwxrwx  1 oracle  oinstall   779 Mar 28 15:28 oratab</span></span>
<span class="line"><span style="color: #D4D4D4">-rwxrwxrwx  1 oracle  oinstall  3584 Apr 16 12:17 spfileFREE.ora</span></span>
<span class="line"><span style="color: #D4D4D4">-rwxrwxrwx  1 oracle  oinstall    69 Mar 28 15:28 sqlnet.ora</span></span>
<span class="line"><span style="color: #D4D4D4">-rwxrwxrwx  1 oracle  oinstall   690 Mar 28 15:28 tnsnames.ora</span></span></code></pre></div>



<h2 class="wp-block-heading">Step 8 &#8211; Remove Container &amp; Volume</h2>



<p>Now we can remove the existing 23c Container and its associated volume.</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2b2b2b;color:#c7c7c7">8) Remove Container &amp; Volume</span><span role="button" tabindex="0" data-code="docker rm 23c
docker volume prune -f" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #DCDCAA">docker</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">rm</span><span style="color: #D4D4D4"> </span><span style="color: #B5CEA8">23</span><span style="color: #CE9178">c</span></span>
<span class="line"><span style="color: #DCDCAA">docker</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">volume</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">prune</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">-f</span></span></code></pre></div>



<h2 class="wp-block-heading">Step 9 &#8211; Recreate 23c Container</h2>



<p>Finally, we recreate the container as in step 4. The only difference is the volume. We use now a local directory.</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);--cbp-line-highlight-color:rgba(234, 191, 191, 0.2);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2b2b2b;color:#c7c7c7">9a) Recreate 23c Container</span><span role="button" tabindex="0" data-code="docker run -d \
    --name 23c \
    -p 1522:1521 \
    -v $HOME/docker/23c-data:/opt/oracle/oradata \
    container-registry.oracle.com/database/free" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #DCDCAA">docker</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">run</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">-d</span><span style="color: #D4D4D4"> </span><span style="color: #D7BA7D">\</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #569CD6">--name</span><span style="color: #D4D4D4"> </span><span style="color: #B5CEA8">23</span><span style="color: #CE9178">c</span><span style="color: #D4D4D4"> </span><span style="color: #D7BA7D">\</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #569CD6">-p</span><span style="color: #D4D4D4"> </span><span style="color: #B5CEA8">1522</span><span style="color: #CE9178">:1521</span><span style="color: #D4D4D4"> </span><span style="color: #D7BA7D">\</span></span>
<span class="line cbp-line-highlight"><span style="color: #D4D4D4">    </span><span style="color: #569CD6">-v</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">$HOME</span><span style="color: #CE9178">/docker/23c-data:/opt/oracle/oradata</span><span style="color: #D4D4D4"> </span><span style="color: #D7BA7D">\</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #CE9178">container-registry.oracle.com/database/free</span></span></code></pre></div>



<p>To monitor the console output we run the following command:</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2b2b2b;color:#c7c7c7">9b) Monitor console output</span><span role="button" tabindex="0" data-code="docker logs -tf 23c" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #DCDCAA">docker</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">logs</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">-tf</span><span style="color: #D4D4D4"> </span><span style="color: #B5CEA8">23</span><span style="color: #CE9178">c</span></span></code></pre></div>



<p>Here&#8217;s the log output with timestamps. The database was up and running after 40 seconds.</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2b2b2b;color:#c7c7c7">9c) Console Output</span><span role="button" tabindex="0" data-code="2023-04-16T10:27:31.320723000Z Starting Oracle Net Listener.
2023-04-16T10:27:31.958206000Z Oracle Net Listener started.
2023-04-16T10:27:31.958391000Z Starting Oracle Database instance FREE.
2023-04-16T10:28:08.401153000Z Oracle Database instance FREE started.
2023-04-16T10:28:08.404032000Z 
2023-04-16T10:28:08.520502000Z The Oracle base remains unchanged with value /opt/oracle
2023-04-16T10:28:11.555842000Z #########################
2023-04-16T10:28:11.565430000Z DATABASE IS READY TO USE!
2023-04-16T10:28:11.565936000Z #########################
2023-04-16T10:28:11.670669000Z The following output is now a tail of the alert.log:
2023-04-16T10:28:11.697019000Z FREEPDB1(3):Opening pdb with Resource Manager plan: DEFAULT_PLAN
2023-04-16T10:28:11.697309000Z 2023-04-16T10:28:07.384593+00:00
2023-04-16T10:28:11.697423000Z Completed: Pluggable database FREEPDB1 opened read write 
2023-04-16T10:28:11.697460000Z 2023-04-16T10:28:07.573292+00:00
2023-04-16T10:28:11.697490000Z ===========================================================
2023-04-16T10:28:11.697518000Z Dumping current patch information
2023-04-16T10:28:11.697545000Z ===========================================================
2023-04-16T10:28:11.697581000Z No patches have been applied
2023-04-16T10:28:11.697606000Z ===========================================================
2023-04-16T10:28:11.697633000Z Completed: ALTER DATABASE OPEN" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #D4D4D4">2023-04-16T10:27:31.320723000Z Starting Oracle Net Listener.</span></span>
<span class="line"><span style="color: #D4D4D4">2023-04-16T10:27:31.958206000Z Oracle Net Listener started.</span></span>
<span class="line"><span style="color: #D4D4D4">2023-04-16T10:27:31.958391000Z Starting Oracle Database instance FREE.</span></span>
<span class="line"><span style="color: #D4D4D4">2023-04-16T10:28:08.401153000Z Oracle Database instance FREE started.</span></span>
<span class="line"><span style="color: #D4D4D4">2023-04-16T10:28:08.404032000Z </span></span>
<span class="line"><span style="color: #D4D4D4">2023-04-16T10:28:08.520502000Z The Oracle base remains unchanged with value /opt/oracle</span></span>
<span class="line"><span style="color: #D4D4D4">2023-04-16T10:28:11.555842000Z #########################</span></span>
<span class="line"><span style="color: #D4D4D4">2023-04-16T10:28:11.565430000Z DATABASE IS READY TO USE!</span></span>
<span class="line"><span style="color: #D4D4D4">2023-04-16T10:28:11.565936000Z #########################</span></span>
<span class="line"><span style="color: #D4D4D4">2023-04-16T10:28:11.670669000Z The following output is now a tail of the alert.log:</span></span>
<span class="line"><span style="color: #D4D4D4">2023-04-16T10:28:11.697019000Z FREEPDB1(3):Opening pdb with Resource Manager plan: DEFAULT_PLAN</span></span>
<span class="line"><span style="color: #D4D4D4">2023-04-16T10:28:11.697309000Z 2023-04-16T10:28:07.384593+00:00</span></span>
<span class="line"><span style="color: #D4D4D4">2023-04-16T10:28:11.697423000Z Completed: Pluggable database FREEPDB1 opened read write </span></span>
<span class="line"><span style="color: #D4D4D4">2023-04-16T10:28:11.697460000Z 2023-04-16T10:28:07.573292+00:00</span></span>
<span class="line"><span style="color: #D4D4D4">2023-04-16T10:28:11.697490000Z ===========================================================</span></span>
<span class="line"><span style="color: #D4D4D4">2023-04-16T10:28:11.697518000Z Dumping current patch information</span></span>
<span class="line"><span style="color: #D4D4D4">2023-04-16T10:28:11.697545000Z ===========================================================</span></span>
<span class="line"><span style="color: #D4D4D4">2023-04-16T10:28:11.697581000Z No patches have been applied</span></span>
<span class="line"><span style="color: #D4D4D4">2023-04-16T10:28:11.697606000Z ===========================================================</span></span>
<span class="line"><span style="color: #D4D4D4">2023-04-16T10:28:11.697633000Z Completed: ALTER DATABASE OPEN</span></span></code></pre></div>



<p>We can press Ctrl-C once we see this output.</p>



<h2 class="wp-block-heading">Summary</h2>



<p>Thanks to the prepared database files within the Docker image we can start an Oracle Database quite fast. Even on a Mac with an M-Series chip.&nbsp; Mounting a folder as a volume needs a bit of fiddling. I like to mount volumes this way because they are easy to share and I can reset the underlying VM without losing data.</p>



<p>The runtime performance of the Database in a Colima container is still bad, compared to my Intel i7 Mac mini and the Oracle Database under Windows on ARM. Depending on the workload it is 5 to 10 times slower. Sometimes even more.&nbsp; <del>I do not see a big difference with or without Rosetta 2. That&#8217;s a bit disappointing. Maybe I do something wrong and someone can point me in the right direction.</del> Microsoft showed what&#8217;s possible.</p>



<p>Anyway, I&#8217;m not sure if I&#8217;m going to use a database within Colima during my live demos. But I will definitely keep one ready as a backup.</p>



<p>Hopefully, Oracle will release an ARM version of their Database soon.</p>


<hr class="" style="margin:0 auto 30px;"/>




<p><em>Updated on 2022-11-02, Rosetta 2 cannot be used with X86_64 architecture. Colima silently falls back to QEMU. To use Rosetta 2 you need to pass <code>--arch aarch64</code> when creating the Colima VM. However, it will not be possible to start an Oracle Database. You will get the same errors as with the default Docker context. Added a note in step 3 and crossed out the relevant parts in the summary.</em></p>



<p><em>Updated on 2024-11-05, new section &#8220;ARM Docker Images Now Available&#8221; at the top of the post.</em></p>
<p>The post <a href="https://www.salvis.com/blog/2023/04/16/oracle-database-23c-on-a-mac-with-an-m-series-chip/">Oracle Database 23c on a Mac with an M-Series Chip</a> appeared first on <a href="https://www.salvis.com/blog">Philipp Salvisberg&#039;s Blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.salvis.com/blog/2023/04/16/oracle-database-23c-on-a-mac-with-an-m-series-chip/feed/</wfw:commentRss>
			<slash:comments>43</slash:comments>
		
		
			</item>
		<item>
		<title>Cannot Install Extensions in SQL Developer 4 on Mac OS X</title>
		<link>https://www.salvis.com/blog/2015/05/05/cannot-install-extensions-in-sql-developer-4-on-mac-os-x/</link>
		
		<dc:creator><![CDATA[Philipp Salvisberg]]></dc:creator>
		<pubDate>Tue, 05 May 2015 15:19:36 +0000</pubDate>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[SQL Developer]]></category>
		<guid isPermaLink="false">http://www.salvis.com/blog/?p=2720</guid>

					<description><![CDATA[<p>Today I could not install any SQL Developer extension on my Mac OS X machine. I did not get an error message during the installation. After a restart of SQL Developer, the extension simply was missing. When I tried to re-install it &#8211; selecting &#8220;Check for updates&#8230;&#8221; in the &#8220;Help&#8221; menu &#8211; I got the<span class="excerpt-hellip"> […]</span></p>
<p>The post <a href="https://www.salvis.com/blog/2015/05/05/cannot-install-extensions-in-sql-developer-4-on-mac-os-x/">Cannot Install Extensions in SQL Developer 4 on Mac OS X</a> appeared first on <a href="https://www.salvis.com/blog">Philipp Salvisberg&#039;s Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Today I could not install any SQL Developer extension on my Mac OS X machine. I did not get an error message during the installation. After a restart of SQL Developer, the extension simply was missing. When I tried to re-install it &#8211; selecting &#8220;Check for updates&#8230;&#8221; in the &#8220;Help&#8221; menu &#8211; I got the following message:</p>



<figure class="wp-block-image"><a href="//www.salvis.com/blog/wp-content/uploads/2015/05/sqldev4.1.19.07.png"><img decoding="async" width="1232" height="304" src="//www.salvis.com/blog/wp-content/uploads/2015/05/sqldev4.1.19.07.png" alt="sqldev4.1.19.07" class="wp-image-2721"/></a></figure>



<p>Restarting SQL Developer did not help. This message was shown again and no extension was&nbsp;installed. I&#8217;ve tried to remove the <em>$HOME/.sqldeveloper</em> directory and reinstalled SQL Developer, but the problem persisted. I&#8217;ve tried&nbsp;SQL Developer version 4.0.3.16.84 and the brand new version 4.1.0.19.07. Same result.</p>



<h2 class="wp-block-heading">What was the problem?</h2>



<p>After some analysis, I found the root cause. SQL Developer creates a file named jdeveloper-deferred-updates.txt in the directory $HOME/.sqldeveloper (e.g. /Users/phs/.sqldeveloper). This file is read and copied into a temporary directory as part of the installation process. On non-Windows platforms,<span class="s1"> the name of the temporary directory is <em>$TMPDIR/$USER </em>(e.g. <em>/var/folders/lf/8g3r0ts900gfdfn2xxkn9yz00000gn/T/phs</em>). If a file with such a name already exists, the directory cannot be created and the whole installation of the extension fails.</span></p>



<h2 class="wp-block-heading"><span class="s1">What is the solution (workaround)?</span></h2>



<p><span class="s1">Open a terminal window (e.g. type terminal in the spotlight window) and execute the following command to delete the existing temporary file, which is causing the name conflict:</span></p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#1E1E1E"><svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg></span><span role="button" tabindex="0" data-code="rm $TMPDIR/$USER" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #DCDCAA">rm</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">$TMPDIR</span><span style="color: #CE9178">/</span><span style="color: #9CDCFE">$USER</span></span></code></pre></div>



<p>Afterwards, restart SQL Developer and install the extension. Restart SQL Developer once again to complete the installation.</p>
<p>The post <a href="https://www.salvis.com/blog/2015/05/05/cannot-install-extensions-in-sql-developer-4-on-mac-os-x/">Cannot Install Extensions in SQL Developer 4 on Mac OS X</a> appeared first on <a href="https://www.salvis.com/blog">Philipp Salvisberg&#039;s Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Apple iPad Camera Connection Kit &#8211; What&#8217;s faster USB or SD Card?</title>
		<link>https://www.salvis.com/blog/2012/12/02/apple-ipad-connection-camera-kit-whats-faster-usb-or-sd-card/</link>
		
		<dc:creator><![CDATA[Philipp Salvisberg]]></dc:creator>
		<pubDate>Sun, 02 Dec 2012 13:46:48 +0000</pubDate>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Performance]]></category>
		<guid isPermaLink="false">http://www.salvis.com/blog/?p=192</guid>

					<description><![CDATA[<p>I&#8217;ve just bought a Sony DSC RX100 camera with an Apple iPad Camera Connection Kit. The kit contains an USB adapter and a SD Card adapter. I intend to copy photos to my iPad for review and backup purposes during my holidays. My son argued that the SD card adapter must be<span class="excerpt-hellip"> […]</span></p>
<p>The post <a href="https://www.salvis.com/blog/2012/12/02/apple-ipad-connection-camera-kit-whats-faster-usb-or-sd-card/">Apple iPad Camera Connection Kit &#8211; What&#8217;s faster USB or SD Card?</a> appeared first on <a href="https://www.salvis.com/blog">Philipp Salvisberg&#039;s Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>I&#8217;ve just bought a Sony DSC RX100 camera with an Apple iPad Camera Connection Kit. The kit contains an USB adapter and a SD Card adapter. I intend to copy photos to my iPad for review and backup purposes during my holidays. My son argued that the SD card adapter must be faster since the SD Card has a read/write capability of 45 MB/s and the USB 2.0 connection is limited to 35 MB/s. &#8211; Sounds reasonable, but nonetheless I had to test that&#8230;</p>
<p>&#8230; so I shot 300 photos with a total size of 2&#8217;155&#8217;522&#8217;108 bytes. Here are the result of some copy scenarios.</p>
<p>
<table id="tablepress-1" class="tablepress tablepress-id-1">
<thead>
<tr class="row-1">
	<th class="column-1">#</th><th class="column-2">Copy Scenario</th><th class="column-3">Time in seconds</th><th class="column-4">Transfer rate in MB/s</th>
</tr>
</thead>
<tbody class="row-striping">
<tr class="row-2">
	<td class="column-1">1</td><td class="column-2">Copy photos from MacBook Retina card reader to a Mac OS folder using cp</td><td class="column-3">47.7</td><td class="column-4">43.1</td>
</tr>
<tr class="row-3">
	<td class="column-1">2</td><td class="column-2">Copy photos from RX100 camera connected via USB adapter to a Mac OS folder using cp</td><td class="column-3">211.7</td><td class="column-4">9.7</td>
</tr>
<tr class="row-4">
	<td class="column-1">3</td><td class="column-2">Copy photos from SD card adapter to my iPad 3 using Photos app</td><td class="column-3">221.1</td><td class="column-4">9.3</td>
</tr>
<tr class="row-5">
	<td class="column-1">4</td><td class="column-2">Copy photos from RX100 camera connected via USB adapter to my iPad 3 using Photos app</td><td class="column-3">279.8</td><td class="column-4">7.3</td>
</tr>
</tbody>
</table>
</p>
<p>My son was correct, the SD card adapter delivers better throughput results than the USB adapter. Further investigation is required to figure out why the transfer rates are far below the theoretical maximums. However, for me both options are good enough and the transfer rates are acceptable.</p>
<p>The post <a href="https://www.salvis.com/blog/2012/12/02/apple-ipad-connection-camera-kit-whats-faster-usb-or-sd-card/">Apple iPad Camera Connection Kit &#8211; What&#8217;s faster USB or SD Card?</a> appeared first on <a href="https://www.salvis.com/blog">Philipp Salvisberg&#039;s Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
