Comments (5)
Hmm, that is definitely odd. I pulled the latest ruby:2.5-slim
image to make sure the base image hasn't changed drastically somehow and caused the error, but I was still able to build successfully with make build
.
It almost seems like the COPY . /var/www
might not be working correctly (i.e. the .sh script isn't being copied over correctly)... could you add the following lines above the find /var/www/docker
one in the Dockerfile and let me know what it outputs?
ls -la /var/www &&\
ls -la /var/www/docker &&\
Worst case, we can modify the Dockerfile to get rid of the entrypoint script. The only reason it was in there is because I wasn't sure if later on I'd add an episode where we add in an nginx sidecar container. And in that case, I had it setup so we could expose /data
as a volume for the nginx container to read from (all the entrypoint script does is copy public assets to /data
on startup).
from kubernetes-on-rails-starter-files.
This is the output I get appending those lines:
+ mkdir -p /var/bundle /var/www /var/www/docker /data/public
+ chown -R web:web /var/bundle /var/www /data
+ cd /var/www/
+ ls -la /var/www
+ ls -la /var/www/docker
total 488
drwxr-xr-x 1 web web 4096 Jan 9 22:41 .
drwxr-xr-x 1 root root 4096 Jan 9 22:41 ..
-rw-r--r-- 1 web web 8196 Dec 10 16:59 .DS_Store
-rw-r--r-- 1 web web 312 Sep 7 22:04 .babelrc
-rw-r--r-- 1 web web 149 Jan 9 22:15 .dockerignore
-rw-r--r-- 1 web web 273 Jan 4 23:54 .env
-rw-r--r-- 1 web web 397 Jan 9 21:34 .env.docker-build
-rw-r--r-- 1 web web 47 Sep 7 22:58 .eslintrc.js
-rw-r--r-- 1 web web 716 Dec 7 21:30 .gitignore
-rw-r--r-- 1 web web 52 Sep 7 22:04 .postcssrc.yml
-rw-r--r-- 1 web web 322 Sep 7 22:04 .rubocop.yml
-rw-r--r-- 1 web web 4759 Sep 7 22:04 .rubocop_todo.yml
-rw-r--r-- 1 web web 5 Jan 9 22:29 .ruby-version
drwxr-xr-x 1 web web 4096 Sep 7 22:56 .vscode
-rw-r--r-- 1 web web 2715 Jan 9 22:35 Dockerfile
-rw-r--r-- 1 web web 2813 Jan 9 22:29 Gemfile
-rw-r--r-- 1 web web 10735 Jan 9 22:30 Gemfile.lock
-rw-r--r-- 1 web web 505 Jan 9 21:11 Makefile
-rw-r--r-- 1 web web 30 Dec 10 17:46 Procfile
-rw-r--r-- 1 web web 374 Sep 7 22:04 README.md
-rw-r--r-- 1 web web 227 Sep 7 22:04 Rakefile
drwxr-xr-x 1 web web 4096 Jan 7 22:04 app
-rw-r--r-- 1 web web 746 Jan 7 17:45 app.yaml
drwxr-xr-x 1 web web 4096 Sep 7 22:04 bin
drwxr-xr-x 1 web web 4096 Jan 9 21:50 config
-rw-r--r-- 1 web web 130 Sep 7 22:04 config.ru
drwxr-xr-x 1 web web 4096 Dec 10 16:59 db
drwxr-xr-x 2 web web 4096 Jan 9 22:41 docker
drwxr-xr-x 1 web web 4096 Oct 8 22:55 lib
drwxr-xr-x 1 web web 4096 Jan 4 22:27 log
-rw-r--r-- 1 web web 595 Dec 11 18:01 package.json
drwxr-xr-x 1 web web 4096 Dec 10 07:58 public
drwxr-xr-x 1 web web 4096 Sep 7 22:04 storage
drwxr-xr-x 1 web web 4096 Sep 7 22:04 test
drwxr-xr-x 1 web web 4096 Sep 7 22:04 vendor
-rw-r--r-- 1 web web 334558 Dec 11 18:01 yarn.lock
total 8
drwxr-xr-x 2 web web 4096 Jan 9 22:41 .
drwxr-xr-x 1 web web 4096 Jan 9 22:41 ..
+ find /var/www/docker -type f -name *.sh -print0
+ xargs -0 chmod +x
chmod: missing operand after '+x'
Try 'chmod --help' for more information.
About modifying the Dockerfile, If you happen to have a dockerfile without that entrypoint script, that would help newbies like me a lot.
I think it would be nice if in the future you could provide somewhere in this repo / another repo / blog series, examples of dockerfiles running just rails apps / rails apps with webpacker, so people can get a basic idea of how to build common cases of rails apps.
from kubernetes-on-rails-starter-files.
Hmm, I notice that the docker
directory seems to have a different timestamp than the other directories - can you verify the entrypoint.sh
file actually exists in the captioned_images/docker
directory of your git repo? You can do that with ls docker
and/or git status
If it has been deleted you should be able to get it back with
git reset HEAD docker/entrypoint.sh
git checkout -- docker/entrypoint.sh
If that doesn't fix it then I'll remove the entrypoint script from the Dockerfile (and maybe I'll do it anyway) 😁
from kubernetes-on-rails-starter-files.
You're totally right, I deleted the folder by mistake. I thought later it was a folder created by some of the commands on the Dockerfile .
My bad 😓. Thank you so much.
from kubernetes-on-rails-starter-files.
No worries at all; I'm glad it was a simple fix! 😁
Thanks for the feedback about the entrypoint script being confusing from a beginner's perspective, it's easy to forget how things appear to people who are still learning.
Let me know how things go for you guys with the rest of the course! 🍻
from kubernetes-on-rails-starter-files.
Related Issues (2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kubernetes-on-rails-starter-files.