Skip to main content

2023 | OriginalPaper | Buchkapitel

14. Building Images

verfasst von : Sean Scott

Erschienen in: Oracle on Docker

Verlag: Apress

Aktivieren Sie unsere intelligente Suche, um passende Fachinhalte oder Patente zu finden.

search-config
loading …

Abstract

There are certain mysteries in life I don’t need (or even want) to understand. Avoiding the knowledge preserves a bit of wonder for the world around me. Sewing machines are one of those things. I can sew by hand, albeit without much talent, but I’ve never figured out how a machine can duplicate that effort. Even with easy access to the Internet, where I could surely find a YouTube video that reveals the entire process in slow motion with stitch-by-stitch expert narration, I’ve resisted learning the underlying principles of sewing machines. How a machine pokes a needle partway through the fabric and then secures each stitch from below is beyond me. I know better, but the best explanation I can imagine involves tiny gremlins that live inside the machine, furiously looping bobbin thread through each stitch. I’m content not knowing—it nourishes a fascination and appreciation of everyday things and reminds me there are wonderfully intelligent and inventive people all around! Or that magic truly exists!

Sie haben noch keine Lizenz? Dann Informieren Sie sich jetzt über unsere Produkte:

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Fußnoten
1
A relative path simply means “relative to the current position in the directory tree” and isn’t very different than giving someone directions for reaching a destination from your current location. Absolute paths are anchored at a reference point. On Linux systems, it’s the root directory, /. Relative paths start with a dot; absolute paths begin with a slash.
 
2
Docker also accepts context using text files and URLs of remote repositories and tarballs. You’re unlikely to encounter these when building larger images, including databases. URL-based builds transfer their context over a network. It’s not a practical or efficient method when the context includes larger files like those used to install Oracle.
 
3
Nothing prevents shortcuts or links in the context, provided they’re not referenced by COPY or ADD instructions in the Dockerfile.
 
4
You won’t be able to remove images used by any containers without adding the -f option to docker rmi or first deleting its container(s) with docker rm.
 
5
Repositories may have multiple parts to their path, like this example from a repository in the Oracle Cloud: phx.ocir.io/ax3qrddf103e/oracle/database:19.13.1-ee. The image name is database. Everything before that is the repository path.
 
6
If you’re absolutely sure that you want to prune a resource and prefer to skip Docker’s nagging “Are you sure?” dialog, add the -f or --force flag.
 
7
I’m using CentOS as an example here because the official images publish a “latest” tag. The official Oracle Linux images don’t typically provide a “latest” tag that leads to this confusion.
 
8
It’s easy to imagine base images are static and overlook them as the cause behind errors or changing behavior in images. Fixing the version of source images referenced in the Dockerfile’s FROM clause makes troubleshooting image development easier and eliminating them as variables in the equation.
 
9
In step 1 of stage-2, Docker copies directories from the image created in the builder stage. As an OS operation, I can’t easily improve it short of moving to faster storage. However, I could look at the size and contents copied in this step and either limit what’s being copied or reduce the size at the source, created in earlier stages.
 
Metadaten
Titel
Building Images
verfasst von
Sean Scott
Copyright-Jahr
2023
Verlag
Apress
DOI
https://doi.org/10.1007/978-1-4842-9033-0_14