[devdocsgjs/wip/andyholmes/dockerfile: 2/3] Dockerfile: cleanup and udpate with Dockerfile-alpine




commit 70cf8e7d80728b95869182bb0bcd4da0f4071782
Author: Andy Holmes <andrew g r holmes gmail com>
Date:   Sun Aug 14 15:09:22 2022 -0700

    Dockerfile: cleanup and udpate with Dockerfile-alpine
    
    Cleanup our alpine stage comments and commands, and include upstream's
    changes to `Dockerfile-alpine`.

 Dockerfile        | 21 +++++++++++----------
 Dockerfile-alpine |  2 +-
 2 files changed, 12 insertions(+), 11 deletions(-)
---
diff --git a/Dockerfile b/Dockerfile
index fd316407..94f7bcc5 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -109,15 +109,14 @@ RUN echo adw1 appindicator301 appstreamglib10 atk10 atspi20 cairo10 \
         cally10 clutter10 cogl10 coglpango10 meta10 \
         | tr ' ' '\n' | xargs -L1 -P$(nproc) bundle exec thor docs:generate --force
 
-# We deploy in ruby:2.7.5-alpine for size
+# We deploy in ruby:2.7.6-alpine for size
 #
 # Changes from Dockerfile-alpine:
-# - Ruby 2.6.0 -> 2.7.6
-# - Copy from the build-stage image instead of the current dir
-# - Update bundler CLI usage
-# - Remove `thor compile:assets` until we run in production mode (TODO)
-# - The css and javascript docsets don't resolve and have been removed
-# - User permission fixes
+# - Copy from the "build" stage instead of the current dir
+# - Update `bundler config` usage
+# - Remove `thor docs:download --all` (performed in "build" stage)
+# - Remove `thor assets:compile` until we run in production mode (TODO)
+# - Fix permissions for "rbuser"
 FROM docker.io/library/ruby:2.7.6-alpine
 
 ENV LANG=C.UTF-8
@@ -136,9 +135,11 @@ RUN apk --update add nodejs build-base libstdc++ gzip git zlib-dev libcurl && \
     rm -rf /var/cache/apk/* /tmp ~/.gem /root/.bundle/cache \
     /usr/local/bundle/cache /usr/lib/node_modules
 
-RUN adduser -D -h /devdocs -s /bin/bash -G root -u 1000 rbuser
-RUN chmod -R 775 /devdocs
-RUN chown -R rbuser:root /devdocs
+# Fix permissions for "rbuser"
+RUN adduser -D -h /devdocs -s /bin/bash -G root -u 1000 rbuser && \
+    chmod -R 775 /devdocs && \
+    chown -R rbuser:root /devdocs
+
 EXPOSE 9292
 CMD bundle exec rackup -o 0.0.0.0
 
diff --git a/Dockerfile-alpine b/Dockerfile-alpine
index 63df62e9..dcd296a2 100644
--- a/Dockerfile-alpine
+++ b/Dockerfile-alpine
@@ -1,4 +1,4 @@
-FROM ruby:2.6.5-alpine
+FROM ruby:2.7.6-alpine
 
 ENV LANG=C.UTF-8
 ENV ENABLE_SERVICE_WORKER=true


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]