Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Guide issue: Docker Desktop can not finish! #20032

Open
1 task done
JaxVN opened this issue May 14, 2024 · 0 comments
Open
1 task done

Guide issue: Docker Desktop can not finish! #20032

JaxVN opened this issue May 14, 2024 · 0 comments
Labels
area/get-started Relates to get started and onboarding docs status/triage Needs triage

Comments

@JaxVN
Copy link

JaxVN commented May 14, 2024

Is this a docs issue?

  • My issue is about the documentation content or website

Type of issue

Information is incorrect

Description

Run your app in a development container

The following steps describe how to run a development container with a bind mount that does the following:

Mount your source code into the container
Install all dependencies
Start nodemon to watch for filesystem changes

You can use the CLI or Docker Desktop to run your container with a bind mount.
at Tab Docker Desktop can not see the Logs
Make sure you don't have any getting-started containers currently running.

Run the image with a bind mount.

Select the search box at the top of Docker Desktop.

In the search window, select the Images tab.

In the search box, specify the container name, getting-started.

    Tip

    Use the search filter to filter images and only show Local images.

Select your image and then select Run.

Select Optional settings.

In Host path, specify the path to the getting-started-app directory on your host machine.

In Container path, specify /app.

Select Run.

You can watch the container logs using Docker Desktop.

Select Containers in Docker Desktop.
Select your container name.

You'll know you're ready to go when you see this:

nodemon -L src/index.js
[nodemon] 2.0.20
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: js,mjs,json
[nodemon] starting `node src/index.js`
Using sqlite database at /etc/todos/todo.db
Listening on port 3000

at tab PowerShell CLI: i can done and see the logs!

Location

https://docs.docker.com/get-started/06_bind_mounts/

Suggestion

Docker Desktop version: 4.29.0 (145265), and the GUI i can not see the where i can do as PowerShell CLI

docker run -dp 127.0.0.1:3000:3000 `
    -w /app --mount "type=bind,src=$pwd,target=/app" `
    node:18-alpine `
    sh -c "yarn install && yarn run dev"

image

May be you need take a look and check it out!

@JaxVN JaxVN added the status/triage Needs triage label May 14, 2024
@craig-osterhout craig-osterhout added the area/get-started Relates to get started and onboarding docs label May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/get-started Relates to get started and onboarding docs status/triage Needs triage
Projects
None yet
Development

No branches or pull requests

2 participants