From f69c151e50e652b336372e494105bcf8dc14e84a Mon Sep 17 00:00:00 2001 From: tsoganov Date: Mon, 14 Apr 2025 15:17:49 +0300 Subject: [PATCH] Added dockerfile for production k8s --- .dockerignore | 46 +++++++++++++++++++++++++++++++++++++++++++ Dockerfile.production | 4 ++-- 2 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 000000000..dab88edcd --- /dev/null +++ b/.dockerignore @@ -0,0 +1,46 @@ +# Git +.git +.gitignore +.github + +# Docker +.dockerignore +Dockerfile* +docker-compose* + +# Rails specific +log/* +tmp/* +storage/* +.bundle +.byebug_history +.rspec +spec/ +test/ +coverage/ +public/assets +public/packs +node_modules +yarn-error.log + +# Environment files +.env* +config/master.key +config/credentials/*.key + +# Documentation +README.md +CHANGELOG.md +LICENSE +docs/ + +# Editor files +.idea/ +.vscode/ +*.swp +*.swo +*~ + +# OS specific +.DS_Store +Thumbs.db diff --git a/Dockerfile.production b/Dockerfile.production index 51e3e2084..40748ac95 100644 --- a/Dockerfile.production +++ b/Dockerfile.production @@ -1,7 +1,6 @@ # Make sure RUBY_VERSION matches the Ruby version in .ruby-version and Gemfile ARG RUBY_VERSION=3.0.3 -ARG TARGETPLATFORM=linux/amd64 -FROM --platform=${TARGETPLATFORM} registry.docker.com/library/ruby:$RUBY_VERSION-slim AS base +FROM registry.docker.com/library/ruby:$RUBY_VERSION-slim AS base # Rails app lives here WORKDIR /opt/webapps/app @@ -77,6 +76,7 @@ RUN apt-get update -qq && \ zip \ unzip \ libzip-dev \ + nodejs \ && apt-get clean \ && rm -rf /var/lib/apt/lists/*