dockersamples / 101-tutorial Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
When working through the tutorial, the Updating Our Application section doesn't load after I finish working through the second section of the tutorial. I am doing the tutorial through Play With Docker on the browser instead of Docker Desktop.
Dragging and dropping the app file does not keep file structure. It removes the directories and just dumps all the files into the /root directory in a jumbled unstructured mess.
As a tip, you can drag and drop the zip (or any other file) on to the terminal in PWD.
In Docker Meetup Tokyo, this was hard for a lot of attendees.
Adding screenshot would be helpful.
The path to app.js in the section Updating our source code is mentioned as -
~/app/src/static/app.js
while in the application zip provided its found under -
~/app/src/static/js/app.js
I was following the Docker 101 tutorial on the Docker Playground and reached Starting an App Container checkpoint in Our Application section.
As directed I hit the docker run -dp 3000:3000 docker-101
command and waited for 3000 badge to appear on PWD interface, but nothing happened the badge never appeared.
Instead, a very long ambiguous number appeared after the command on PWD in Docker Playground.
I even tried manually to access localhost, but all in vain.
MacBook Pro Specs:
OS:
Google Chrome:
I was never able to access the Node To-Do List Application running on port 3000.
https://www.docker.com/101-tutorial
This website actually lists that command:
docker run -dp 80:80 docker/getting-started:pwd
Which is not what is then referred in the tutorial's first step.
Similar, but not exactly.
I copy and pasted the code for creating the Dockerfile.
First issue: yarn has changed its commands, it is now "add" instead of "install"
Second Issue: after giving the 'docker build -t docker-101 .' command, the first three steps are successful, but it gives an error at step 4 after it tries to add v1.22.5, saying
"error Missing list of packages to add to your project."
Not exactly inspiring to learn Docker when the tutorial requires so much debugging
After Waiting for http://ip172-18-0-63-bsgi06boudsg00bqlvf0-80.direct.labs.play-with-docker.com/
Finally
http://ip172-18-0-63-bsgi06boudsg00bqlvf0-80.direct.labs.play-with-docker.com/
Says
This page isn’t working
ip172-18-0-63-bsgi06boudsg00bqlvf0-80.direct.labs.play-with-docker.com didn’t send any data.
ERR_EMPTY_RESPONSE
Was working 26th July 2020.
$ docker run -p 80:80 dockersamples/101-tutorial
2020/05/26 03:31:09 [emerg] 1#1: open() "/etc/nginx/nginx.conf" failed (13: Permission denied)
nginx: [emerg] open() "/etc/nginx/nginx.conf" failed (13: Permission denied)
In tutorial/using-docker-compose/index.md, links refer to https://docs.docker.com/compose/compose-file#<id>
.
But relative paths are changed, so it should be https://docs.docker.com/compose/compose-file/compose-file-v3/#<id>
.
Please correct these links.
Thank you.
The link create a file
to the pwd-tips page does not work in the section Creating our Compose File.
The link points to
/pwd-tips.md#creating-files
but should point to
/pwd-tips#creating-files
All goes well in the tutorial until I try to run sh -c "yarn install && yarn run dev"
(e.g. in "Using bind mounts" -> "Starting a Dev-Mode Container", or "Multi-Container Apps" -> "Running our App with MySQL").
And there's not even time to check the logs because the container fails to start.
Any idea on how to debug and fix this?
Thanks !
In chapter of Multi-Container Apps (highly instructive!) , netshoot is started inside the main PWD command prompt to show off easy networking. Thats great.
You may want to mention that typing 'exit' at the netshoot prompt is the way to get out to 'your own' prompt again, as ctrl-C, ctrl-Z or ctrl-D do not do the trick.
I am trying to setup a windows-based docker develop enviornment like this:
windows 10 2004 workstation edition
docker for windows 2.3.0.2 with wsl2 as backend
i following the tutorial like :
step 1 git clone https://github.com/docker/getting-started.git
step 2 docker build -t docker101tutorial .
during the step 2 an exception occoured:
Sending build context to Docker daemon 9.435MB
Step 1/21 : FROM python:alpine AS base
---> 054f329df1c5
Step 2/21 : WORKDIR /app
---> Using cache
---> 3fb6cd766e15
Step 3/21 : COPY requirements.txt .
---> Using cache
---> 5712e1150971
Step 4/21 : RUN pip install -r requirements.txt
---> Using cache
---> e3757ae8c576
Step 5/21 : FROM node:12-alpine AS app-base
---> 7a48db49edbf
Step 6/21 : WORKDIR /app
---> Using cache
---> 8b8fae23197c
Step 7/21 : COPY app/package.json app/yarn.lock ./
---> Using cache
---> 154a104d8200
Step 8/21 : RUN yarn install
---> Running in 9780480d0af9
yarn install v1.22.4
[1/4] Resolving packages...
[2/4] Fetching packages...
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
error /app/node_modules/sqlite3: Command failed.
Exit code: 1
Command: node-pre-gyp install --fallback-to-build
Arguments:
Directory: /app/node_modules/sqlite3
Output:
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using [email protected]
node-pre-gyp info using [email protected] | linux | x64
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp info check checked for "/app/node_modules/sqlite3/lib/binding/node-v72-linux-x64/node_sqlite3.node" (not found)
node-pre-gyp http GET https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.1.0/node-v72-linux-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v72 ABI, musl) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error socket hang up
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp info ok
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp ERR! find Python
gyp ERR! find Python Python is not set from command line or npm configuration
gyp ERR! find Python Python is not set from environment variable PYTHON
gyp ERR! find Python checking if "python" can be used
gyp ERR! find Python - "python" is not in PATH or produced an error
gyp ERR! find Python checking if "python2" can be used
gyp ERR! find Python - "python2" is not in PATH or produced an error
gyp ERR! find Python checking if "python3" can be used
gyp ERR! find Python - "python3" is not in PATH or produced an error
gyp ERR! find Python
gyp ERR! find Python **********************************************************
gyp ERR! find Python You need to install the latest version of Python.
gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
gyp ERR! find Python you can try one of the following options:
gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable"
gyp ERR! find Python (accepted by both node-gyp and npm)
gyp ERR! find Python - Set the environment variable PYTHON
gyp ERR! find Python - Set the npm configuration variable python:
gyp ERR! find Python npm config set python "/path/to/pythonexecutable"
gyp ERR! find Python For more information consult the documentation at:
gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
gyp ERR! find Python **********************************************************
gyp ERR! find Python
gyp ERR! configure error
gyp ERR! stack Error: Could not find any Python installation to use
gyp ERR! stack at PythonFinder.fail (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:307:47)
gyp ERR! stack at PythonFinder.runChecks (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:136:21)
gyp ERR! stack at PythonFinder. (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:179:16)
gyp ERR! stack at PythonFinder.execFileCallback (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:271:16)
gyp ERR! stack at exithandler (child_process.js:310:5)
gyp ERR! stack at ChildProcess.errorhandler (child_process.js:322:5)
gyp ERR! stack at ChildProcess.emit (events.js:310:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:273:12)
gyp ERR! stack at onErrorNT (internal/child_process.js:469:16)
gyp ERR! stack at processTicksAndRejections (internal/process/task_queues.js:84:21)
gyp ERR! System Linux 4.19.84-microsoft-standard
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/app/node_modules/sqlite3/lib/binding/node-v72-linux-x64/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/app/node_modules/sqlite3/lib/binding/node-v72-linux-x64" "--napi_version=5" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v72"
gyp ERR! cwd /app/node_modules/sqlite3
gyp ERR! node -v v12.16.3
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/app/node_modules/sqlite3/lib/binding/node-v72-linux-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/app/node_modules/sqlite3/lib/binding/node-v72-linux-x64 --napi_version=5 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
node-pre-gyp ERR! stack at ChildProcess. (/app/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:310:20)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
node-pre-gyp ERR! System Linux 4.19.84-microsoft-standard
node-pre-gyp ERR! command "/usr/local/bin/node" "/app/node_modules/sqlite3/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /app/node_modules/sqlite3
node-pre-gyp ERR! node -v v12.16.3
node-pre-gyp ERR! node-pre-gyp -v v0.11.0
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/app/node_modules/sqlite3/lib/binding/node-v72-linux-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/app/node_modules/sqlite3/lib/binding/node-v72-linux-x64 --napi_version=5 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
The command '/bin/sh -c yarn install' returned a non-zero code: 1
many thanks
Using the docker playground to run the tutorial and I've run into an issue getting the app to work correctly in the second stage "Our Application".
Steps to reproduce (essentially just follow the instructions):
docker run -dp 80:80 docker/getting-started:pwd
(as per https://www.docker.com/101-tutorial )Dockerfile
following the instructions.Expected result: Connecting to the node todo app.
Actual result: Connection reset error.
I assume the difference between running the tutorial locally and in the playground is the reason for the differences in the image files (the :pwd
at the end.)
I've tried this running on a separate instance from the main tutorial, even changing the port to 80 in case of some weird playground firewall (because that port works for the tutorial itself.) Even attempting to connect locally to the port (within the playground) results in errors (e,g, from Curl: curl: (56) Recv failure: Connection reset by peer
)
Running docker-compose up
gives an error build path ..\101-tutorial\docs either does not exist, is not accessible, or is not a valid URL. What I am doing wrong?
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.