nigelpoulton / psweb Goto Github PK
View Code? Open in Web Editor NEWSample web-app for use with Pluralsight courses and Docker Deep Dive book
Sample web-app for use with Pluralsight courses and Docker Deep Dive book
Your book, "Docker Deep Dive," on Amazon, still references this very repo in chapter 4.
possibly me being dumb, but when I cloned the repo for the psweb example, it lacked the circle.yml and the test directory and contents. I grabbed them from an earlier version in the repo (they were deleted in the 2023 update commit - but I have the 2023 book and it refers to them) - builds fine now.
Great book!
nodejs-npm is no longer existed in the latest alpine and it has to be replaced with npm.
Hi,
Trying to build the image as per the book instructions gives an error:
$docker image build -t test:latest .
Sending build context to Docker daemon 74.75kB
Step 1/8 : FROM alpine
---> 3fd9065eaf02
Step 2/8 : LABEL maintainer="[email protected]"
---> Using cache
---> 11f318a672f1
Step 3/8 : RUN apk add --update nodejs nodejs-npm
---> Running in 4e758412be23
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz
ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.7/main: temporary error (try again later)
WARNING: Ignoring APKINDEX.70c88391.tar.gz: No such file or directory
ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.7/community: operation timed out
WARNING: Ignoring APKINDEX.5022a8a2.tar.gz: No such file or directory
ERROR: unsatisfiable constraints:
nodejs (missing):
required by: world[nodejs]
nodejs-npm (missing):
required by: world[nodejs-npm]
The command '/bin/sh -c apk add --update nodejs nodejs-npm' returned a non-zero code: 2
Hi,
I am new to Docker world i am trying to build the image and followed the steps as showed in the video. But i am getting below error :
Step 3/8 : RUN apk add --update node.js nodejs-npm
---> Running in 6f8d572825d1
fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/community/x86_64/APKINDEX.tar.gz
ERROR: unsatisfiable constraints:
node.js (missing):
required by: world[node.js]
The command '/bin/sh -c apk add --update node.js nodejs-npm' returned a non-zero code: 1
And my Dockerfile looks like this :
FROM alpine
LABEL maintainer ="[email protected]"
RUN apk add --update nodejs nodejs-npm
COPY . /src
WORKDIR /src
RUN npm install
EXPOSE 8080
ENTRYPOINT [ "node","./app.js" ]
I am getting the error while I am trying to build the image from your Dockerfile. However, I found the issue is coming from the nodejs-npm that is no longer existed in the latest alpine.
I change the nodejs-npm to npm now then all is going fine.
Sending build context to Docker daemon 66.56kB
Step 1/8 : FROM alpine
latest: Pulling from library/alpine
5843afab3874: Pull complete
Digest: sha256:234cb88d3020898631af0ccbbcca9a66ae7306ecd30c9720690858c1b007d2a0
Status: Downloaded newer image for alpine:latest
---> d4ff818577bc
Step 2/8 : LABEL maintainer="[email protected]"
---> Running in 62f961bd649a
Removing intermediate container 62f961bd649a
---> a01ed7dfb8f0
Step 3/8 : RUN apk add --update nodejs nodejs-npm
---> Running in d8bda7e3eb67
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/community/x86_64/APKINDEX.tar.gz
ERROR: unable to select packages:
nodejs-npm (no such package):
required by: world[nodejs-npm]
The command '/bin/sh -c apk add --update nodejs nodejs-npm' returned a non-zero code: 1
typo error on vulnerabilities
Hello @nigelpoulton,
I encountered an issue while building the docker image, which I have attached a photo of. However, I was able to resolve the issue by making changes to the Dockerfile and using From node: alpine
.
I am curious to know if this is a good practice. Additionally, if you have any input on this issue, I would greatly appreciate it.
Thank you.
Hi,
I am just getting through your book - Docker Deep Dive - and I am not able making to work the example app downloaded from psweb github repository. I have installed Docker on Amazon EC2 instance, based on Ubuntu/Xenial OS.
If i run docker container ls command it shows that the container is running, but the browser says it cannot access the site. I am using the public DNS address of the EC2 instance and port 8080 like in your example but the site does not load.
I am new to Docker and cloud services and I do not know how to debug it. The instance is on the default security group assigned automatically by amazon. Its inbound rules for http is as follows: protocol - tcp, port - 80, source - 0.0.0.0/0.
I was wondering if the fact that the only allowed port is 80 may block the browser to access the app. I tried to edit the rules but for some reason I cannot to change the port at all.
I know that above description may be too general, but if you have any ideas how to tackle this problem, please let me know.
Thanks!
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.