question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

docker build -t getting-started . failed

See original GitHub issue

OS: MacBook Pro (13-inch, M1, 2020) when i follow https://docs.docker.com/get-started/02_our_app/ to learn build the app’s container image. type docker build -t getting-started . on terminal,and occur the error: 1 in this time,my dockerfile is : image and change RUN apk add --no-cache python2 to RUN apk add --no-cache python3 the error changed: image

i don’t kown how to solve it,I would appreciate your assistance with this matter

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:3
  • Comments:10

github_iconTop GitHub Comments

1reaction
Jamesmahaitaocommented, Jun 20, 2022

@Jamesmahaitao Are you still facing the issue?

I ran the code here and it worked. I manually typed your Dockerfile:

FROM node:12-alpine
RUN apk add --no-cache python2 g++ make
WORKDIR /app
COPY . .
RUN yarn install --production
CMD ["node", "src/index.js"]
EXPOSE 300

I use a MacPro M1, and the built went through.

Screen Shot 2022-06-03 at 12 42 40 AM
  • What I would suggest is:

    1. How did you install Docker? If you used the Docker Desktop client, maybe it’s worth updating it.
    2. After updating your Docker, I would recommend deleting your img, and building it again: docker image rm getting-started
    3. Another thing would be copy & pasting the Dockerfile info from the tutorial’s page, just in case there’s any typo on your own file.
    4. One last option, based on the comment made by Gohoy, is to verify that you have a stable connection, because the node:12-alpine image will update it’s packages and it performes a few downloads.

Let me know if you had any progress.

Thank you so much for your reply, I update my Docker desktop to 4.9.0(80466), and then run docker build -t getting-started . again, it works. Dockerfile: image

0reactions
opfsuncommented, Jun 7, 2022

2021 app mi pro

Read more comments on GitHub >

github_iconTop Results From Across the Web

"docker build -t getting-started ." failed · Issue #221 - GitHub
I am doing the tutorial part Using Docker Compose on Windows 10 20H2. I run docker build -t getting-started . on step 2...
Read more >
Unable to build a docker image following Docker Tutorial
I should have run the docker build -t getting-started . command from the /app folder where my newly-created Dockerfile is located. In my...
Read more >
Docker build not working: rpc error (PROTOCOL_ERROR)
I've been trying to build an image from my Dockerfile but I run into an error when i run docker build . The...
Read more >
Building a Docker image - Backstage.io
How to build a Backstage Docker image for deployment. ... then the `tar` command below will fail: `can't create directory 'packages/': Permission denied`....
Read more >
A Docker Tutorial for Beginners
The getting started guide on Docker has detailed instructions for setting up Docker ... If you haven't done that yet, please go ahead...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found