This is a repo for new users getting started with Docker.
You can try it out using the following command.
docker compose up -d
And open http://localhost:3000 in your browser.
This is a repo for new users getting started with Docker.
You can try it out using the following command.
docker compose up -d
And open http://localhost:3000 in your browser.
When running example multi-container-app from WSL, example was not loading on localhost:3000. Solution was to map it to different port i.e. 8090:3000.
Hi folks, i was following docker tutorial Multi-container applications , the i got stuck.
after git clone, i try build the clone by using this command docker build -t multi-container-app
, and it gives me thi ERROR: failed to solve: failed to read dockerfile: open Dockerfile: no such file or directory
.
after that i move on to use this command "docker compose up -d" and it gives me this error
"todo-database Pulling
todo-database Error Head "https://registry-1.docker.io/v2/library/mongo/manifests/6": unauthorized: incorrect username or password
Error response from daemon: Head "https://registry-1.docker.io/v2/library/mongo/manifests/6": unauthorized: incorrect username or password"
i run the command using git inside multi-container-app folder
please help me
Docker Compose version v2.21.0-desktop.1 results in the following error:
validating docker_tutorial/multi-container-app/compose.yaml: services.todo-app Additional property develop is not allowed
when running docker compose up -d
Microsoft Windows [Version 10.0.22621.2428]
(c) Корпорация Майкрософт (Microsoft Corporation). Все права защищены.
C:\Windows\System32>git clone https://github.com/docker/multi-container-app
Cloning into 'multi-container-app'... remote: Enumerating objects: 2307, done. remote: Counting objects: 100% (39/39), done. remote: Compressing objects: 100% (24/24), done. remote: Total 2307 (delta 11), reused 26 (delta 11), pack-reused 2268 Receiving objects: 100% (2307/2307), 3.83 MiB | 2.79 MiB/s, done. Resolving deltas: 100% (366/366), done.
C:\Windows\System32>cd multi-container-app
C:\Windows\System32\multi-container-app>docker build -t multi-container-app .
[+] Building 0.0s (0/0) docker:default 2024/06/05 23:06:00 http2: server: error reading preface from client //./pipe/docker_engine: file has already been close[+] Building 0.1s (1/1) FINISHED docker:default => [internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 2B 0.0s ERROR: failed to solve: failed to read dockerfile: open Dockerfile: no such file or directory
View build details: docker-desktop://dashboard/build/default/default/uxwi1u2piw4n36pfdbwax30l9
multi-container-app/compose.yaml
Line 29 in 7b11449
Followed through tutorial directions as found in docker docs and have encountered issue. Can't run todo-database; logs show the following error at each attempt.
exec /usr/local/bin/docker-entrypoint.sh: exec format error
WARNING: MongoDB 5.0+ requires a CPU with AVX support, and your current system does not appear to have that!
As I was following the short tutorial for the multi-container-app, I noticed that all todos have the same date next to them, which is also the date of when the app boots.
docker-compose up -d
Each todo has its own timestamp for the time it was created. I believe the logic from models/Todo.js should move to routes/front.js.
I pulled directly from this repo as the docker desktop walkthrough asks and ran provided command given and received the following error:
➜ multi-container-app git:(main) ✗ docker compose up -d
validating /Users/scalvert/source/multi-container-app/compose.yaml: services.todo-app Additional property develop is not allowed
compose.yaml file:
# Comments are provided throughout this file to help you get started.
# If you need more help, visit the Docker compose reference guide at
# https://docs.docker.com/compose/compose-file/
# Here the instructions define your application as two services called "todo-app" and “todo-database”
# The service “todo-app” is built from the Dockerfile in the /app directory,
# and the service “todo-database” uses the official MongoDB image
# from Docker Hub - https://hub.docker.com/_/mongo.
# You can add other services your application may depend on here.
services:
todo-app:
build:
context: ./app
depends_on:
- todo-database
environment:
NODE_ENV: production
ports:
- 3000:3000
- 35729:35729
develop:
watch:
- path: ./app/package.json
action: rebuild
- path: ./app
target: /usr/src/app
action: sync
todo-database:
image: mongo:6
#volumes:
# - database:/data/db
ports:
- 27017:27017
#volumes:
#database:
Cannot success following docker desktop Learning Center 's instruction
docker compose up -d
[+] Building 0.0s (0/0) docker:default
[+] Building 3.1s (9/12) docker:default
=> [todo-app internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 1.29kB 0.0s
=> [todo-app] resolve image config for docker.io/docker/dockerfile:1 1.6s
=> CACHED [todo-app] docker-image://docker.io/docker/dockerfile:1@sha256:ac85f380a63b13dfcefa89046420e1781752bab202122f8f50032edf31be0021 0.0s
=> [todo-app internal] load metadata for docker.io/library/node:19.5.0-alpine 0.9s
=> [todo-app internal] load .dockerignore 0.0s
=> => transferring context: 706B 0.0s
=> [todo-app stage-0 1/6] FROM docker.io/library/node:19.5.0-alpine@sha256:4619ec6c9a43ab4edfa12cf96745319c3ca43aff9dd630ab20e684dd3632318e 0.0s
=> [todo-app internal] load build context 0.0s
=> => transferring context: 904B 0.0s
=> CACHED [todo-app stage-0 2/6] WORKDIR /usr/src/app 0.0s
=> ERROR [todo-app stage-0 3/6] RUN --mount=type=bind,source=package.json,target=package.json --mount=type=bind,source=package-lock.json,target=package-lock.json --mount=type=cache,target=/root/.npm npm ci -- 0.3s
------
> [todo-app stage-0 3/6] RUN --mount=type=bind,source=package.json,target=package.json --mount=type=bind,source=package-lock.json,target=package-lock.json --mount=type=cache,target=/root/.npm npm ci --include=dev:
0.312 undefined:1
0.312
0.312
0.312
0.312 SyntaxError: /usr/local/lib/node_modules/npm/package.json: Unexpected token '', ""... is not valid JSON
0.312 at parse (<anonymous>)
0.312 at Module._extensions..json (node:internal/modules/cjs/loader:1315:39)
0.312 at Module.load (node:internal/modules/cjs/loader:1103:32)
0.312 at Module._load (node:internal/modules/cjs/loader:942:12)
0.312 at Module.require (node:internal/modules/cjs/loader:1127:19)
0.312 at require (node:internal/modules/helpers:112:18)
0.312 at createEnginesValidation (/usr/local/lib/node_modules/npm/lib/cli.js:7:15)
0.312 at module.exports (/usr/local/lib/node_modules/npm/lib/cli.js:78:27)
0.312 at Object.<anonymous> (/usr/local/lib/node_modules/npm/bin/npm-cli.js:2:25)
0.312 at Module._compile (node:internal/modules/cjs/loader:1246:14)
0.312
0.312 Node.js v19.5.0
------
failed to solve: process "/bin/sh -c npm ci --include=dev" did not complete successfully: exit code: 1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.