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




commit 5ef7f95addb57c183dc759d64592601f9b150aa7
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 8ecaad7c..f281d0c4 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -106,15 +106,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
@@ -133,9 +132,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]