Rails 容器与配置(3)

2021-10-20 09:49:05 浏览数 (1)

通过 docker inspect afdddae9b2bf 可以获得丰富的,容器镜像的细节

Tip: 后面的操作并不依赖于这上面的操作,上面的操作只是为了演示官方 rails 镜像的拉取和相关属性


拷贝 Rails 应用

从这里开始构建一个可以被反复使用的 Rails 镜像

代码语言:javascript复制
[root@h202 ruby]# ls
blog
[root@h202 ruby]# rsync  -av blog/   root@192.168.100.104:/tmp/blog
root@192.168.100.104's password: 
sending incremental file list
created directory /tmp/blog
./
.gitignore
Gemfile
Gemfile.lock
README.rdoc
Rakefile
config.ru
app/
app/assets/
app/assets/images/
app/assets/images/.keep
app/assets/javascripts/
app/assets/javascripts/application.js
app/assets/javascripts/articles.coffee
app/assets/javascripts/comments.coffee
app/assets/javascripts/welcome.coffee
app/assets/stylesheets/
app/assets/stylesheets/application.css
app/assets/stylesheets/articles.scss
app/assets/stylesheets/comments.scss
app/assets/stylesheets/welcome.scss
app/controllers/
app/controllers/application_controller.rb
app/controllers/articles_controller.rb
app/controllers/comments_controller.rb
app/controllers/welcome_controller.rb
app/controllers/concerns/
app/controllers/concerns/.keep
app/helpers/
app/helpers/application_helper.rb
app/helpers/articles_helper.rb
app/helpers/comments_helper.rb
app/helpers/welcome_helper.rb
app/mailers/
app/mailers/.keep
app/models/
app/models/.keep
app/models/article.rb
app/models/comment.rb
app/models/concerns/
app/models/concerns/.keep
app/views/
app/views/articles/
app/views/articles/_form.html.reb
app/views/articles/edit.html.erb
app/views/articles/index.html.erb
app/views/articles/new.html.erb
app/views/articles/show.html.erb
app/views/comments/
app/views/comments/_comment.html.erb
app/views/comments/_form.html.erb
app/views/layouts/
app/views/layouts/application.html.erb
app/views/welcome/
app/views/welcome/index.html.erb
bin/
bin/bundle
bin/rails
bin/rake
bin/setup
bin/spring
config/
config/application.rb
config/boot.rb
config/database.yml
config/environment.rb
config/routes.rb
config/secrets.yml
config/environments/
config/environments/development.rb
config/environments/production.rb
config/environments/test.rb
config/initializers/
config/initializers/assets.rb
config/initializers/backtrace_silencers.rb
config/initializers/cookies_serializer.rb
config/initializers/filter_parameter_logging.rb
config/initializers/inflections.rb
config/initializers/mime_types.rb
config/initializers/session_store.rb
config/initializers/wrap_parameters.rb
config/locales/
config/locales/en.yml
db/
db/development.sqlite3
db/schema.rb
db/seeds.rb
db/migrate/
db/migrate/20160422140912_create_articles.rb
db/migrate/20160427082552_create_comments.rb
lib/
lib/assets/
lib/assets/.keep
lib/tasks/
lib/tasks/.keep
log/
log/.keep
log/development.log
public/
public/404.html
public/422.html
public/500.html
public/favicon.ico
public/robots.txt
test/
test/test_helper.rb
test/controllers/
test/controllers/.keep
test/controllers/articles_controller_test.rb
test/controllers/comments_controller_test.rb
test/controllers/welcome_controller_test.rb
test/fixtures/
test/fixtures/.keep
test/fixtures/articles.yml
test/fixtures/comments.yml
test/helpers/
test/helpers/.keep
test/integration/
test/integration/.keep
test/mailers/
test/mailers/.keep
test/models/
test/models/.keep
test/models/article_test.rb
test/models/comment_test.rb
tmp/
tmp/cache/
tmp/cache/assets/
...
...
tmp/cache/assets/sprockets/v3.0/z_/z_Prv0YfktgUwhZma2rWy0-p7b7X6Fp4yrAvnhlhUP4.cache
tmp/pids/
tmp/sessions/
tmp/sockets/
vendor/
vendor/assets/
vendor/assets/javascripts/
vendor/assets/javascripts/.keep
vendor/assets/stylesheets/
vendor/assets/stylesheets/.keep

sent 902359 bytes  received 4048 bytes  139447.23 bytes/sec
total size is 883817  speedup is 0.98
[root@h202 ruby]# 
代码语言:javascript复制
[root@h104 tmp]# cp blog/ blog2 -r 
[root@h104 tmp]# cd blog2
[root@h104 blog2]# ls
app  bin  config  config.ru  db  Gemfile  Gemfile.lock  lib  log  public  Rakefile  README.rdoc  test  tmp  vendor
[root@h104 blog2]#

0 人点赞