# Docker on macOS: Getting Started | raywenderlich.com

**URL:** <https://forums.kodeco.com/t/docker-on-macos-getting-started-raywenderlich-com/55269>\
**Category:** 🎓 Courses & Articles\
**Created:** [November 12, 2018, 3:51pm UTC](https://forums.kodeco.com/t/docker-on-macos-getting-started-raywenderlich-com/55269 "2018-11-12T15:51:24Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![audrey](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/audrey/32/111607_2.png) [@audrey](https://forums.kodeco.com/u/audrey)\
**Post date:** [November 12, 2018, 3:51pm UTC](https://forums.kodeco.com/t/docker-on-macos-getting-started-raywenderlich-com/55269/1 "2018-11-12T15:51:24Z")

</div>

In this Docker tutorial, you’ll learn Docker vocabulary and the commands for creating, inspecting and removing containers, networks and data volumes. You’ll learn how to run Docker containers in the background or foreground, and switch between the two; how to publish ports; how to connect a database app and a web app running in separate containers; and how to share directories between containers and your Mac and among containers.

* * *
This is a companion discussion topic for the original entry at [https://www.raywenderlich.com/9159-docker-on-macos-getting-started](https://www.raywenderlich.com/9159-docker-on-macos-getting-started)

---

<div class="post-metadata">

**Author:** ![barty82](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/barty82/32/110342_2.png) [@barty82](https://forums.kodeco.com/u/barty82)\
**Post date:** [November 14, 2018, 6:33am UTC](https://forums.kodeco.com/t/docker-on-macos-getting-started-raywenderlich-com/55269/2 "2018-11-14T06:33:42Z")

</div>

Hi Audrey,  
Thanks for your awesome tutorials always. But on my MacBook I have an issue on the following code:

> docker run --network emoji-net --name emojijournal -it -p 8090:8080 -v $PWD:/root/project -w /root/project emojijournal-run sh -c .build-ubuntu/release/EmojiJournalServer

It occurs the following error:

> invalid reference format: repository name must be lowercase

So I googled little bit regarding on this and found the resolution.

> docker run --network emoji-net --name emojijournal -it -p 8090:8080 -v “$(pwd):/root/project” -w /root/project emojijournal-run sh -c .build-ubuntu/release/EmojiJournalServer

Just letting you know^^  
Thank you.

---

<div class="post-metadata">

**Author:** ![audrey](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/audrey/32/111607_2.png) [@audrey](https://forums.kodeco.com/u/audrey)\
**Post date:** [November 14, 2018, 8:35am UTC](https://forums.kodeco.com/t/docker-on-macos-getting-started-raywenderlich-com/55269/3 "2018-11-14T08:35:11Z")

</div>

thanks @barty82! the message happens if some part of your path has a space or similar character. I usually make sure my folder is on the Desktop, but quote marks are more convenient 😄

---

<div class="post-metadata">

**Author:** ![witham](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/witham/32/93560_2.png) [@witham](https://forums.kodeco.com/u/witham)\
**Post date:** [November 25, 2018, 9:03am UTC](https://forums.kodeco.com/t/docker-on-macos-getting-started-raywenderlich-com/55269/4 "2018-11-25T09:03:14Z")

</div>

Hi Audrey,

Just wanted to add for the benefit of others that when you first try to run `docker run hello-world` it may fail even when the docker app is running. The first time I ran docker from the terminal I had to enter my username and password for the docker site using the following command

`docker login`

Also worth mentioning that you have to enter your username not your email address, even though it leads you to believe you have to enter your email.

After you have done it once on a Mac and it is stored in the keychain, you are good to go next time, no login is required again.

Great tutorial!

---

<div class="post-metadata">

**Author:** ![audrey](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/audrey/32/111607_2.png) [@audrey](https://forums.kodeco.com/u/audrey)\
**Post date:** [November 25, 2018, 9:35am UTC](https://forums.kodeco.com/t/docker-on-macos-getting-started-raywenderlich-com/55269/5 "2018-11-25T09:35:49Z")

</div>

thanks @witham! although I did test without logging in, and it worked. More than one of my RW colleagues pointed out to me that you don’t need to login to pull, or even to search Docker Hub. I was trying to avoid readers having to even register, because there were some posts in the Docker forum, saying it took a long time to get the confirm-your-email email. That’s why I supplied the direct link to download Docker.

Glad you enjoyed the tutorial :]

---

<div class="post-metadata">

**Author:** ![pitachip3000](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/pitachip3000/32/81494_2.png) [@pitachip3000](https://forums.kodeco.com/u/pitachip3000)\
**Post date:** [March 22, 2019, 3:56am UTC](https://forums.kodeco.com/t/docker-on-macos-getting-started-raywenderlich-com/55269/6 "2019-03-22T03:56:40Z")

</div>

Hey Audry!

Thanks for writing up this tutorial. Unfortunately, I’m hitting a roadblock. I run the command $ . runDocker.sh, the server is not started, instead I have this message on the last line “sh: 1: .build-ubuntu/release/EmojiJournalServer: not found”. I have removed all of the containers and images and gone back through the tutorial, to no avail. Same error.

Uploaded is a screenshot of the containers that are on my system, but when I type docker ps, only couchdb seems to be running.

![46%20PM](https://files.chunter.kodeco.com/original/3X/c/2/c20ac8cef123a4bd2723270c8d1dbc2f08e60afe.png)

Any ideas are appreciated!  
Peter

---

<div class="post-metadata">

**Author:** ![audrey](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/audrey/32/111607_2.png) [@audrey](https://forums.kodeco.com/u/audrey)\
**Post date:** [March 22, 2019, 6:44am UTC](https://forums.kodeco.com/t/docker-on-macos-getting-started-raywenderlich-com/55269/7 "2019-03-22T06:44:40Z")

</div>

hi Peter: when I run that command, the **.build-ubuntu/release** folder is created right near the end, just after this output:

> Resolving [GitHub - Kitura/CircuitBreaker: A Swift Circuit Breaker library – Improves application stability and reliability.](https://github.com/IBM-Swift/CircuitBreaker.git) at 5.0.1  
> Cloning [GitHub - Kitura/Configuration: Hierarchical configuration manager for Swift applications](https://github.com/IBM-Swift/Configuration.git)  
> Resolving [GitHub - Kitura/Configuration: Hierarchical configuration manager for Swift applications](https://github.com/IBM-Swift/Configuration.git) at 3.0.2

and just before this output:

> [2019-03-22T06:38:30.703Z] [INFO] [Application.swift:63 connectionProperties] No cloud credentials. Running in Docker

**Shift-Command-.** in Finder shows the hidden files. See what you have?

---

<div class="post-metadata">

**Author:** ![pitachip3000](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/pitachip3000/32/81494_2.png) [@pitachip3000](https://forums.kodeco.com/u/pitachip3000)\
**Post date:** [March 22, 2019, 4:37pm UTC](https://forums.kodeco.com/t/docker-on-macos-getting-started-raywenderlich-com/55269/8 "2019-03-22T16:37:14Z")

</div>

Hey Audrey,

I am able to look into my .build-ubuntu folder. Inside, there are two directories (“checkouts” and “repositories”) and one text file “regenerate-token”. There is no directory /release inside 😕

---

<div class="post-metadata">

**Author:** ![shogunkaramazov](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/shogunkaramazov/32/108826_2.png) [@shogunkaramazov](https://forums.kodeco.com/u/shogunkaramazov)\
**Post date:** [March 22, 2019, 5:23pm UTC](https://forums.kodeco.com/t/docker-on-macos-getting-started-raywenderlich-com/55269/9 "2019-03-22T17:23:33Z")

</div>

@audrey Can you please help with this when you get a chance? Thank you - much appreciated! :]

---

<div class="post-metadata">

**Author:** ![audrey](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/audrey/32/111607_2.png) [@audrey](https://forums.kodeco.com/u/audrey)\
**Post date:** [March 22, 2019, 10:48pm UTC](https://forums.kodeco.com/t/docker-on-macos-getting-started-raywenderlich-com/55269/10 "2019-03-22T22:48:26Z")

</div>

if you still have the Terminal window where you ran the command, scroll back to see if there was an error when it was cloning from IBM-Swift. Or run the command again, and see what’s happening?

---

<div class="post-metadata">

**Author:** ![muaddib](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/muaddib/32/100816_2.png) [@muaddib](https://forums.kodeco.com/u/muaddib)\
**Post date:** [March 31, 2019, 8:36pm UTC](https://forums.kodeco.com/t/docker-on-macos-getting-started-raywenderlich-com/55269/11 "2019-03-31T20:36:19Z")

</div>

Hi audrey,  
Thanks for the tutorial, unfortantely When trying to build wift, My terminal window gets stuck on the stencil.GIt fetch command. Any reason for that ? ![38%20PM](https://files.chunter.kodeco.com/original/3X/6/f/6f949fc98e7d806b184c8ccfe36ee4570a79bbb1.jpeg)

Can you help please?

---

<div class="post-metadata">

**Author:** ![audrey](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/audrey/32/111607_2.png) [@audrey](https://forums.kodeco.com/u/audrey)\
**Post date:** [March 31, 2019, 9:48pm UTC](https://forums.kodeco.com/t/docker-on-macos-getting-started-raywenderlich-com/55269/12 "2019-03-31T21:48:16Z")

</div>

scrap all the earlier stuff below, and just download the EmojiJournalServer from David’s [Kitura Stencil tutorial](https://www.raywenderlich.com/1032630-kitura-stencil-tutorial-how-to-make-websites-with-swift). localhost:8080 will only show Hello, world! but localhost:8080/client works.

ah, except David’s version uses an IBM-hosted DB, so it won’t use your local CouchDB Docker container, and all the rest of this tutorial won’t make sense … try replacing David’s Application.swift with the one in this tutorial. I have to go out now, but I’ll check back tonight.

~~hi! I poked around in the [GitHub repo's Package.swift](https://github.com/IBM-Swift/Kitura-StencilTemplateEngine/blob/master/Package.swift) and changed EmojiJournalServer's Package.swift's dependencies — the key for Stencil is Kitura-TemplateEngine.git (no Stencil anymore) at version 2.0.0. I updated a few other versions according to the Package.swift from the Docker Kitura sample. `swift build` is running, currently fetching TypeDecoder.git ... update to this: it seems to be stuck on this, but it's only a minor version update ... I'll let you know what happens. 

Update 2: I changed Configuration.git to 3.0.2, but it’s still stuck on TypeDecoder. I’ve slack-messaged @dokun1 . Stay tuned.

 

I’ll check the rest of the tutorial, then update it to Xcode 4.2 etc.

 

```
import PackageDescription

let package = Package(
  name: "EmojiJournalServer",
  dependencies: [
    .package(url: "https://github.com/IBM-Swift/Kitura.git", .upToNextMinor(from: "2.6.0")),
    .package(url: "https://github.com/IBM-Swift/HeliumLogger.git", .upToNextMinor(from: "1.8.0")),
    .package(url: "https://github.com/IBM-Swift/Kitura-CouchDB.git", .upToNextMinor(from: "2.0.1")),
    .package(url: "https://github.com/IBM-Swift/Kitura-TemplateEngine.git", .upToNextMinor(from: "2.0.0")),
    .package(url: "https://github.com/IBM-Swift/CloudEnvironment.git", from: "9.0.0"),
    .package(url: "https://github.com/IBM-Swift/Configuration.git", from: "3.0.0"),
    .package(url: "https://github.com/RuntimeTools/SwiftMetrics.git", from: "2.0.0"),
    .package(url: "https://github.com/IBM-Swift/Health.git", from: "1.0.0"),
    ],
  targets: [
    .target(name: "EmojiJournalServer", dependencies: ["Configuration", "CloudEnvironment", "SwiftMetrics", "Health", "Kitura", "HeliumLogger", "CouchDB", "KituraStencil"])
  ]
)

```

 ~~

---

<div class="post-metadata">

**Author:** ![muaddib](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/muaddib/32/100816_2.png) [@muaddib](https://forums.kodeco.com/u/muaddib)\
**Post date:** [April 1, 2019, 4:12pm UTC](https://forums.kodeco.com/t/docker-on-macos-getting-started-raywenderlich-com/55269/13 "2019-04-01T16:12:34Z")

</div>

Hi audrey,  
Should I just wait till the tutorial is updated?

---

<div class="post-metadata">

**Author:** ![audrey](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/audrey/32/111607_2.png) [@audrey](https://forums.kodeco.com/u/audrey)\
**Post date:** [April 1, 2019, 10:16pm UTC](https://forums.kodeco.com/t/docker-on-macos-getting-started-raywenderlich-com/55269/14 "2019-04-01T22:16:31Z")

</div>

yes, that’s probably best … it’s not so straightforward, have to swap CouchDB in for Postgres to make David’s work here, probably easier to get my version working — I ran up against “SwiftyJSON not found” … back soon.

OK, I’ve updated the **Download Materials** — reload the page, and you should get [https://koenig-media.raywenderlich.com/uploads/2018/11/EmojiJournalServer-1.zip](https://koenig-media.raywenderlich.com/uploads/2018/11/EmojiJournalServer-1.zip) — some of the Package.swift versions have been updated.

Let me know if it works for you?

---

<div class="post-metadata">

**Author:** ![muaddib](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/muaddib/32/100816_2.png) [@muaddib](https://forums.kodeco.com/u/muaddib)\
**Post date:** [April 7, 2019, 8:53pm UTC](https://forums.kodeco.com/t/docker-on-macos-getting-started-raywenderlich-com/55269/15 "2019-04-07T20:53:52Z")

</div>

Hi audrey,  
I got the new material and tried to go thru it,

I got this error when running . runDocker.sh

docker: Error response from daemon: pull access denied for on, repository does not exist or may require ‘docker login’.  
See ‘docker run --help’.  
Unable to find image ‘on:latest’ locally  
docker: Error response from daemon: pull access denied for on, repository does not exist or may require ‘docker login’.  
See ‘docker run --help’

---

<div class="post-metadata">

**Author:** ![audrey](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/audrey/32/111607_2.png) [@audrey](https://forums.kodeco.com/u/audrey)\
**Post date:** [April 8, 2019, 12:09am UTC](https://forums.kodeco.com/t/docker-on-macos-getting-started-raywenderlich-com/55269/16 "2019-04-08T00:09:56Z")

</div>

I don’t understand why it’s looking for ‘on:latest’ — it should be using ‘emojijournal-build:latest’

I’ve attached the output that I get:

[runDocker-output.txt.zip](https://files.chunter.kodeco.com/original/3X/f/4/f4bc8ad5190af8c75ab90614b5282bcd183e68ac.zip) (3.8 KB)

Do a Find for _tagged_ — there are two of these, for ‘emojijournal-run:latest’ and ‘emojijournal-build:latest’, which correspond to the first 2 `docker build` commands in runDocker.sh. Then the third command runs ‘emojijournal-build’.

Compare with your output? And check your runDocker.sh?

---

<div class="post-metadata">

**Author:** ![shogunkaramazov](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/shogunkaramazov/32/108826_2.png) [@shogunkaramazov](https://forums.kodeco.com/u/shogunkaramazov)\
**Post date:** [July 10, 2019, 5:25pm UTC](https://forums.kodeco.com/t/docker-on-macos-getting-started-raywenderlich-com/55269/17 "2019-07-10T17:25:05Z")

</div>

This tutorial is more than six months old so questions are no longer supported at the moment for it. Thank you!

---

<div class="post-metadata">

**Author:** ![shogunkaramazov](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/shogunkaramazov/32/108826_2.png) [@shogunkaramazov](https://forums.kodeco.com/u/shogunkaramazov)\
**Post date:** [July 10, 2019, 5:25pm UTC](https://forums.kodeco.com/t/docker-on-macos-getting-started-raywenderlich-com/55269/18 "2019-07-10T17:25:12Z")

</div>


