Running FCC Locally with Docker Fail

I’m able to develop locally using npm, but not Docker. I don’t get any response from localhost:8000. However, I get a redirect to the 404 url when accessing localhost:3000 (redirects to http://localhost:8000/404/?messages=danger[0]%3DWe%20couldn%27t%20find%20path%20%2F).

I’ve followed the documentation to run FCC locally via Docker and it seems to complete, but when I visit localhost:8000, I get “localhost didn’t send any data.” as a response.

Any help is greatly appreciated.

I’m on Mac OSX 10.15.6 with Docker Desktop using the directions here:

This is the last output from npm run docker:develop

client_1        | success open and validate gatsby-configs - 2.079s
client_1        | success load plugins - 6.091s
client_1        | success onPreInit - 0.035s
client_1        | success initialize cache - 0.274s
client_1        | success copy gatsby files - 6.438s
client_1        | success onPreBootstrap - 0.158s
client_1        | success createSchemaCustomization - 0.327s
api-server_1    | Mon, 10 Aug 2020 11:59:51 GMT fcc:boot:donate Donation disabled in development unless ALL test keys are provided
api-server_1    | 2020-08-10T12:00:16.851Z 302 GET 324.211 ms - /
api-server_1    | Mon, 10 Aug 2020 12:03:37 GMT fcc:boot:donate activeDonor count: 0
client_1        | success source and transform nodes - 305.143s
client_1        | success building schema - 3.197s
client_1        | info Stripe public key or Servicebot id missing or invalid. Required for donations.
client_1        | success createPages - 28.412s
api-server_1    | Mon, 10 Aug 2020 12:08:36 GMT fcc:boot:donate activeDonor count: 0
client_1        | success createPagesStatefully - 250.455s
client_1        | success onPreExtractQueries - 0.007s
client_1        | success update schema - 4.573s
client_1        | success extract queries from components - 87.329s
client_1        | success write out requires - 25.150s
client_1        | success write out redirect data - 15.941s
client_1        | success Build manifest and related icons - 10.369s
client_1        | success onPostBootstrap - 10.512s
client_1        | ⠀
client_1        | info bootstrap finished - 777.318 s
client_1        | ⠀
client_1        | 
client_1        | 
client_1        | 1721 pages                              IN_PROGRESS                             
client_1        | @freecodecamp/client
1 Like

Hello there,

Just as an aside: The contributing docs are hosted here:

It is the same document, but nicely laid out.

How long do you wait, before trying to access localhost:8000? Because the above should say: SUCCESS instead of IN PROGRESS, before you are able to access the client side.

1 Like

Thanks for the reply. About how long should it take to complete? The local version with npm runs much faster.

The length of time to develop the build is entirely dependent on what hardware you have. So, I cannot give you any useful figures. Here are some estimates:

  • Running on GitPod (an online IDE many contributors use): Full setup takes <5min
  • Running on my Windows 10 laptop: Installing packages takes ~20-30min (my average internet speed is 400kB/s), developing the server takes ~7-10 min.

Hope this helps.


Thanks for your reply again. You were right that the build didn’t complete. I was just impatient because building outside docker was so much faster.

The build did complete (reporting 1721 pages SUCCESS) after letting it sit for an hour, however, visiting localhost:8000 now returned a white screen with no content. I was able to see the graphql exploration panels (http://localhost:8000/___graphql), though.

I can’t think of why it would take so much longer and not work correctly. I can only assume it may be some issue with how I have docker set up. Thank you for your help.

1 Like

Hey there!!! Thank you for you post!!! And I am having the exact same issue as yours!!! Also MacOS 10.15!!! And my machine is mid 2015 15inch, how’s yours?!

God, what a coincidence!:laughing:

After read your post, I realized my building process in the docker is also not finished yet, so I just going to let it keep on doing its job~

By the way, do you still have any other problems?

haha, what are the odds?! wait, you are not also working on the exact same issue like mine, right? If you are, I am going to scream GOD, now😂 Ok, kidding, thanks for your post again!

PS, I was finding solution on the Gitter before, heck, if only I post my problems here instead… but I also asked Mr. Sky020 on the github issue page, but I guess I didn’t provide the screenshot of the logging back then… weird, same day! You know?!:joy:

1 Like

I’m on a 2015 Macbook Pro too. Maybe there’s an issue with Docker? After the build I get a blank white screen when accessing localhost:8000. Traffic is going through, but nothing renders.

Building locally with npm and running mongod locally works, though. The build is faster as well. It’s still a head scratcher for me, because I don’t see any error output on the white screen.

This is funny. I had assumed I was talking to you here.

If both of you (@techmojo and @SeasonLiii) are having the same issue of getting a blank page, after developing:

  • If you open the browser devTools, can you see any source or network activity on localhost:8000?
1 Like

This is what I see when going to localhost:8000

Oh god!!! Let’s have an remote internet hand shake, bro!!!:laughing::laughing::laughing:

And yes! I am having the white screen here! hahaha, I mean, wtf, right?

But I didn’t try the build locally method, according to guys on gitter, they said that’s faster too, maybe I should just use that method and save my time on those weird errors😂

Because I really running out my free time during the day job​:sweat_smile:although it’s midnight in my place right now, :laughing: oh god, you are not also at midnight, right? if you does, wow… no this just can’t be, hahaha

hahaha, when I saw your name replying him, I thought to myself, why didn’t you tell me those in the github page? hahaha, never mind, good thing is I can run it now~hahaha

hey, guys @techmojo @Sky020 , great news!! mine is showing the webpage now!!!:laughing::laughing::laughing:

Although, I didn’t do anything particular… all I did was, when I open the localhost from browser, I let the browser do its job and go to other page like this, and when I went back, it just showed up!!!

how crazy? hahaha​:laughing::laughing::laughing:

I am glad you have managed to get it working. I do not understand why you have requests, though…

What? What socket? Hey, you reply to the wrong guy haha, it’s @techmojo I think :laughing:

Hey, @techmojo give it some times , it might work later, well, who knows, hahaha, at least mine was😆