Kay qillqasqa huk serie qillqakunamanta hukninmi maypi sapa chiru Rails ñawpaqmanta ruwasqa Dockerfile kaqmanta purisaq chaymanta aswan allin ruwaykunata chaymanta allinchaykunata sut'inchasaq.
Docker siq'ikuna hukniray ruwaykunapi allinchasqa kankuman mayqinkunachus, ichaqa mana limitasqachu, siq'i sayay pisiyachiy, ruway ruway allinchay, waqaychasqa, chaymanta waqaychay atiy allin ruwaykuna, chaymanta ruwana-niraq allinchay. Ñawpaq qillqasqapi, siq'i sayay pisiyachiy allinchayllata llamisaq chaymanta sut'inchasaq imarayku ancha chaniyuq kasqankuta.
Imaynachus sapa wak ruwaypi software wiñachiypi, sapa paqarichiqqa razonninkunata listanqa imaraykuchus Docker ruwayninkunata aswan utqaylla ruwayta munan. Listasaqmi imaraykun aswan importante ñoqapaq kashan chayta.
Aswan huch'uy siq'ikunaqa aswan utqaylla ruwanapaqmi, pisi willañiqikuna, qatanakuna llamk'ana kasqanrayku. Kayqa wiñachiq ruruchiyta allinchan, aswanta iterativo wiñachiy ciclokunapi. Aswan huch'uy siq'ikuna pisi pachata hap'inku huk registroman tanqanapaq chaymanta chaymanta aysanapaq mast'ariykunapi. Chayqa aswan allinmi CI/CD gasoductokunapi maypichus sapa kutilla contenedorkuna ruwasqa, churasqa ima.
Aswan huch'uy siq'ikuna pisi waqaychayta contenedor registrokunapi, kiti wiñachiy makinakunapi chaymanta ruruchina sirwiqkunapi tukunku. Kayqa infraestructura nisqa qullqita pisiyachin, aswantaqa hatun mast’ariykunapaq. Aswan huch'uy siq'ikuna pisi banda anchota llamk'achinku mayk'aq servidorkunapura t'inkisqa, aswan importante mayk'aq siq'ikunata llaqtapi utaq CI/CD pipelines kaqpi ruwachkanki chaymanta huk registroman tanqachkanki.
“2022 watapi 3.2m dolarkunata phuyupi gastarqayku... Sayayku yaqa 7 hunu dolarkunata servidor gastokunapi waqaychayta pichqa watakunapi puyu lluqsisqaykumanta.” David Heinemeier Hansson — HEY Mundo
Aswan huch'uy siq'ikuna aswan pisi yanapakuykunata munanku (kayhina, CPU, RAM) karganapaq chaymanta purichinapaq, waqaychanapi ruwanakuna tukuy ruwayninta allinchaspa. Aswan utqaylla qallariy pachakuna niyta munan yanapakuyniyki aswan utqaylla wakichisqa kasqankuta, mayqinchus ancha chaniyuq escalapaq chaymanta hatun-disponibilidad sistemakuna kaqpaq. alpine
utaq debian-slim
hina pisi base siq'ikuna aswan pisi ñawpaq churasqa paquetekunayuq kanku, mana parcheyuq utaq mana necesario software llamk'achisqa kananpaq riesgota pisiyachispa.
Tukuy ima hawapi rimasqanchikmanta hawa, mana necesario archivokunata chaymanta herramientakunata hurquyqa distracciones nisqakunata pisiyachin sasachakuykunata diagnosticachkaspa chaymanta aswan allin mantenimiento nisqaman chaymanta técnica manukuy pisiyachiyman apakun.
Siqimanta hukhina parámetros chaskinapaq, chaymanta chay sayaynin, Docker Escritorio kaqpi qhawayta atikunki utaq docker images
kamachiyta terminal kaqpi purichiyta atikunki.
➜ docker images REPOSITORY TAG IMAGE ID CREATED SIZE kamal-dashboard latest 673737b771cd 2 days ago 619MB kamal-proxy latest 5f6cd8983746 6 weeks ago 115MB docs-server latest a810244e3d88 6 weeks ago 1.18GB busybox latest 63cd0d5fb10d 3 months ago 4.04MB postgres latest 6c9aa6ecd71d 3 months ago 456MB postgres 16.4 ced3ad69d60c 3 months ago 453MB
Imahina hatun kayninta yachaspaqa manam hunt'asqa siq'itachu qusunki. Mana yachankichu imachus siq'i ukhupi kasqanmanta, hayk'a qatayuq kasqanmanta, sapa qata hayk'a hatun kasqanmanta. Docker siq'i qatana nisqaqa ñawirinapaqlla, mana tikray atikuq willañiqi llamkana qatana , Docker siq'ip huk rakin. Sapa qatana huk huñu tikraykunata siq'ip willañiqi llikanpi ruwasqa riqsichin, ahinataq willañiqikuna yapay, ruwanakuna tikray utaq software churay.
Docker siq'ikunaqa yapamanta ruwasqa, qatamanta qataman, sapa qatanataq Dockerfile
nisqapi huk kamachiywan tupan. Siqipa qatankunata hapinaykipaqqa, docker history
kamachiyta purichiyta atinki.
➜ docker history kamal-dashboard:latest IMAGE CREATED CREATED BY SIZE COMMENT 673737b771cd 4 days ago CMD ["./bin/thrust" "./bin/rails" "server"] 0B buildkit.dockerfile.v0 <missing> 4 days ago EXPOSE map[80/tcp:{}] 0B buildkit.dockerfile.v0 <missing> 4 days ago ENTRYPOINT ["/rails/bin/docker-entrypoint"] 0B buildkit.dockerfile.v0 <missing> 4 days ago USER 1000:1000 0B buildkit.dockerfile.v0 <missing> 4 days ago RUN /bin/sh -c groupadd --system --gid 1000 … 54MB buildkit.dockerfile.v0 <missing> 4 days ago COPY /rails /rails # buildkit 56.2MB buildkit.dockerfile.v0 <missing> 4 days ago COPY /usr/local/bundle /usr/local/bundle # b… 153MB buildkit.dockerfile.v0 <missing> 4 days ago ENV RAILS_ENV=production BUNDLE_DEPLOYMENT=1… 0B buildkit.dockerfile.v0 <missing> 4 days ago RUN /bin/sh -c apt-get update -qq && apt… 137MB buildkit.dockerfile.v0 <missing> 4 days ago WORKDIR /rails 0B buildkit.dockerfile.v0 <missing> 3 weeks ago CMD ["irb"] 0B buildkit.dockerfile.v0 <missing> 3 weeks ago RUN /bin/sh -c set -eux; mkdir "$GEM_HOME";… 0B buildkit.dockerfile.v0 <missing> 3 weeks ago ENV PATH=/usr/local/bundle/bin:/usr/local/sb… 0B buildkit.dockerfile.v0 <missing> 3 weeks ago ENV BUNDLE_SILENCE_ROOT_WARNING=1 BUNDLE_APP… 0B buildkit.dockerfile.v0 <missing> 3 weeks ago ENV GEM_HOME=/usr/local/bundle 0B buildkit.dockerfile.v0 <missing> 3 weeks ago RUN /bin/sh -c set -eux; savedAptMark="$(a… 78.1MB buildkit.dockerfile.v0 <missing> 3 weeks ago ENV RUBY_DOWNLOAD_SHA256=018d59ffb52be3c0a6d… 0B buildkit.dockerfile.v0 <missing> 3 weeks ago ENV RUBY_DOWNLOAD_URL=https://cache.ruby-lan… 0B buildkit.dockerfile.v0 <missing> 3 weeks ago ENV RUBY_VERSION=3.4.1 0B buildkit.dockerfile.v0 <missing> 3 weeks ago ENV LANG=C.UTF-8 0B buildkit.dockerfile.v0 <missing> 3 weeks ago RUN /bin/sh -c set -eux; mkdir -p /usr/loca… 19B buildkit.dockerfile.v0 <missing> 3 weeks ago RUN /bin/sh -c set -eux; apt-get update; a… 43.9MB buildkit.dockerfile.v0 <missing> 3 weeks ago # debian.sh --arch 'arm64' out/ 'bookworm' '… 97.2MB debuerreotype 0.15
Imaraykuchus siq'ikunamanta, qatakunamantapas teoría nisqa qurqaniña, chaymi pachaña Dockerfile
maskanapaq. Rails 7.1 kaqmanta qallarispa, Dockerfile
musuq Rails ruwanawan ruwasqa. Uraypiqa huk ejemplon kashan imaynachus kanman chayta.
# syntax=docker/dockerfile:1 # check=error=true # Make sure RUBY_VERSION matches the Ruby version in .ruby-version ARG RUBY_VERSION=3.4.1 FROM docker.io/library/ruby:$RUBY_VERSION-slim AS base # Rails app lives here WORKDIR /rails # Install base packages # Replace libpq-dev with sqlite3 if using SQLite, or libmysqlclient-dev if using MySQL RUN apt-get update -qq && \ apt-get install --no-install-recommends -y curl libjemalloc2 libvips libpq-dev && \ rm -rf /var/lib/apt/lists /var/cache/apt/archives # Set production environment ENV RAILS_ENV="production" \ BUNDLE_DEPLOYMENT="1" \ BUNDLE_PATH="/usr/local/bundle" \ BUNDLE_WITHOUT="development" # Throw-away build stage to reduce size of final image FROM base AS build # Install packages needed to build gems RUN apt-get update -qq && \ apt-get install --no-install-recommends -y build-essential curl git pkg-config libyaml-dev && \ rm -rf /var/lib/apt/lists /var/cache/apt/archives # Install application gems COPY Gemfile Gemfile.lock ./ RUN bundle install && \ rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git && \ bundle exec bootsnap precompile --gemfile # Copy application code COPY . . # Precompile bootsnap code for faster boot times RUN bundle exec bootsnap precompile app/ lib/ # Precompiling assets for production without requiring secret RAILS_MASTER_KEY RUN SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile # Final stage for app image FROM base # Copy built artifacts: gems, application COPY --from=build "${BUNDLE_PATH}" "${BUNDLE_PATH}" COPY --from=build /rails /rails # Run and own only the runtime files as a non-root user for security RUN groupadd --system --gid 1000 rails && \ useradd rails --uid 1000 --gid 1000 --create-home --shell /bin/bash && \ chown -R rails:rails db log storage tmp USER 1000:1000 # Entrypoint prepares the database. ENTRYPOINT ["/rails/bin/docker-entrypoint"] # Start server via Thruster by default, this can be overwritten at runtime EXPOSE 80 CMD ["./bin/thrust", "./bin/rails", "server"]
Uraypi huk lista enfoques chaymanta kamachiykunata qusaq mayqinkunachus maypi Dockerfile
pataman churasqa kanku qhipa siq'i sayayninta eficiente ruwanapaq.
Seguro kani necesitasqa softwarellata llaqtaykipi wiñachiy makinaykipi waqaychanki. Docker siq'ikunapipas kaqllataqmi kanan. Uraypi ejemplokunapi sapa kuti aswan mana allinta ruwasaq Dockerfile hurqusqa Rails Dockerfile hawapi. Chaytaqa Dockerfile
original nisqa laya hinam riqsichisaq.
FROM docker.io/library/ruby:$RUBY_VERSION-slim AS base
Sapsi siq'iqa Dockerfile
nisqap qallariyninmi. Chayqa waqaychanata paqarichinanpaq llamk'achisqa siq'i. Sapsi siq'iqa Dockerfile
nisqapi ñawpaq kaq qatanami, chaymanta sapallan qatana mana kikin Dockerfile
nisqap kamasqan.
Sapsi siq'iqa FROM
kamachiywanmi nisqa, chaymantataq siq'i sutiwan etiquetawan. Etiquetaqa munasqa, mana nisqa kaptinqa, latest
etiqueta llamk'achisqa. Base siq'iqa mayqin siq'ipas Docker Hub kaqpi utaq mayqin wak registro kaqpipas kanman.
Dockerfile
about kaqpi, ruby
siq'ita 3.4.1-slim
etiquetawan llamk'achkayku. ruby
siq'iqa Docker Hub nisqapi kaq Ruby nisqap kamachisqa siq'inmi . 3.4.1-slim
etiqueta nisqaqa Ruby siq'ipa llañu rikch'ayninmi, debian-slim
siq'ipi sayasqa. Mientras debian-slim
siq'i huk pisi laya Debian Linux siq'imanta mayqinchus hatun kayninpaq allinchasqa kachkan. Uraypi tablata qhaway, chay slim
siq’i aswan huch’uy kasqanmanta yuyayta tarinaykipaq.
➜ docker images --filter "reference=ruby" REPOSITORY TAG IMAGE ID CREATED SIZE ruby 3.4.1-slim 0bf957e453fd 5 days ago 219MB ruby 3.4.1-alpine cf9b1b8d4a0c 5 days ago 99.1MB ruby 3.4.1-bookworm 1e77081540c0 5 days ago 1.01GB
2024 watapi enero killamanta pacha, kunan Debian lluqsichisqanqa libro kuru sutiyuqmi, ñawpaq kaqtaq bullseye .
219 MB 1GB rantipi — hatun chikan kay. Ichaqa, ¿imataq kanman alpine
rikchaynin aswan uchuyllaraq kaptin? alpine
siq'iqa Alpine Linux rakiypi sayasqa kachkan, mayqinchus huk super llañu Linux rakiy kachkan chaymanta hatun kayninpaq chaymanta waqaychasqa kananpaq allinchasqa. Alpine musl
bibliotecata ( glibc
-pa rantinpi) chaymanta busybox
(Unix yanapakuykunap hukllachasqa huñun) GNU-pa rantinpi llamk'achin. Sichus técnicamente atikunman chay alpine
siq'ita llamk'achiyta Rails purichinapaq, mana kay qillqasqapi chayta qhawasaqchu.
RUN apt-get update -qq && \ apt-get install --no-install-recommends -y curl libjemalloc2 libvips libpq-dev && \ rm -rf /var/lib/apt/lists /var/cache/apt/archives
Sapa RUN
, COPY
chaymanta FROM
kamachiy Dockerfile
kaqpi musuq qatata ruwan. Aswan qatanakunayuq kaspaqa, aswan hatun siq'i sayaynin. Kayrayku aswan allin ruwayqa achka kamachiykunata huklla RUN
kamachiyman huñuymi. Kayta sut’inchanapaq, kay urapi ejemplota qhawarisun.
# syntax=docker/dockerfile:1 # check=error=true # Make sure RUBY_VERSION matches the Ruby version in .ruby-version ARG RUBY_VERSION=3.4.1 FROM docker.io/library/ruby:$RUBY_VERSION-slim AS base RUN apt-get update -qq RUN apt-get install --no-install-recommends -y curl RUN apt-get install --no-install-recommends -y libjemalloc2 RUN apt-get install --no-install-recommends -y libvips RUN apt-get install --no-install-recommends -y libpq-dev RUN rm -rf /var/lib/apt/lists /var/cache/apt/archives CMD ["echo", "Whalecome!"]
RUN
kamachiyta achka chirukunapi rakirqani, chaytaq sut'imanta aswan runa ñawirinapaq ruwan . Ichaqa, ¿imaynatan afectanqa chay imagenpa hatun kayninta? Imahinata hatarichispa qhawarisunchik.
➜ time docker build -t no-minimize-layers --no-cache -f no-minimize-layers.dockerfile . 0.31s user 0.28s system 2% cpu 28.577 total
28 siqikunatam rurarqan chay siq'ita ruranapaq, ñawpaq kaq llamk'aytataq pisichasqa qatanakunawan ruranapaqqa 19 siqikunallam ( yaqa 33% aswan utqaylla ).
➜ time docker build -t original --no-cache -f original.dockerfile . 0.25s user 0.28s system 2% cpu 19.909 total
Imahinakunapa hatun kayninta qawasunchik.
➜ docker images --filter "reference=*original*" --filter "reference=*no-minimize*" REPOSITORY TAG IMAGE ID CREATED SIZE original latest f1363df79c8a 8 seconds ago 356MB no-minimize-layers latest ad3945c8a8ee 43 seconds ago 379MB
Pisichasqa qatanayuq siq'iqa 23 MB aswan huch'uymi, mana pisiyachisqa qatayuqmantaqa. Kayqa 6% pisiyachiymi hatun kaynin . Kay rikch'anapi huk huch'uy chiqanchay hina rikch'akuptinpas, chiqan kayqa aswan hatun kanqa sichus llapa RUN
kamachiykunata achka chirukunaman rakinki.
Ñawpaqmanta, apt-get install
yuyaychasqa paquetekunata churan chaymanta churanapaq mañasqayki paquetekunatapas. --no-install-recommends
akllana apt-get
kaqman willan sut'imanta willasqa paquetekunallata churananpaq chaymanta mana yuyaychasqakunachu.
➜ time docker build -t without-no-install-recommends --no-cache -f without-no-install-recommends.dockerfile . 0.33s user 0.30s system 2% cpu 29.786 total ➜ docker images --filter "reference=*original*" --filter "reference=*recommends*" REPOSITORY TAG IMAGE ID CREATED SIZE without-no-install-recommends latest 41e6e37f1e2b 3 minutes ago 426MB minimize-layers latest dff22c85d84c 17 minutes ago 356MB
Rikusqaykihina, mana --no-install-recommends
siq'iqa 70 MB aswan hatunmi ñawpaq kaqmanta . Kayqa 16% hatun kaynin yapakuyninmi .
Buceo yanapakuyta llamk'achiy mayqin willañiqikuna siq'iman yapasqa kaqta qhawanaykipaq – aswanta chaymanta ñawiriy qillqa tukukuypi.
Ñawpaq Dockerfile
rm -rf /var/lib/apt/lists/* /var/cache/apt/archives
kamachiyta apt-get install
kamachiymanta qhipaman churan. Kay kamachiyqa churanamanta qhipaman manaña necesitakuq paquete listakunata, waqaychasqakunatapas hurqun. Qawasun imayna siq'i sayayninta afectan, chayta aypanapaq, musuq Dockerfile
ruwasaq mana pichay kamachiywan .
RUN apt-get update -qq && \ apt-get install --no-install-recommends -y curl libjemalloc2 libvips libpq-dev
Imahinakunata ruwanapaqqa yaqa kaqlla pacham, ñawpaq kaqwan, chaymi allin yuyayniyuq.
➜ time docker build -t without-cleaning --no-cache -f without-cleaning.dockerfile . 0.28s user 0.30s system 2% cpu 21.658 total
Imahinakunapa hatun kayninta qawasunchik.
➜ docker images --filter "reference=*original*" --filter "reference=*cleaning*" REPOSITORY TAG IMAGE ID CREATED SIZE without-cleaning latest 52884fe50773 2 minutes ago 375MB original latest f1363df79c8a 16 minutes ago 356MB
Mana pichasqa siq'iqa 19 MB aswan hatunmi pichasqamanta, kayqa 5% hatun kaynin yapakuyninmi .
¿Imataq kanman tawantin allinchaykuna hawapi rimasqanchik mana churasqa kaptin? Musuq Dockerfile
mana ima allinchayniyuqta ruwasun chaymanta siq'ita ruwasun.
# syntax=docker/dockerfile:1 # check=error=true ARG RUBY_VERSION=3.4.1 FROM docker.io/library/ruby:$RUBY_VERSION AS base RUN apt-get update -qq RUN apt-get install -y curl RUN apt-get install -y libjemalloc2 RUN apt-get install -y libvips RUN apt-get install -y libpq-dev CMD ["echo", "Whalecome!"]
➜ time docker build -t without-optimizations --no-cache -f without-optimizations.dockerfile . 0.46s user 0.45s system 1% cpu 1:02.21 total
Wow, huk minuto masraqmi pasarqa chay imagenta ruwanankupaq.
➜ docker images --filter "reference=*original*" --filter "reference=*without-optimizations*" REPOSITORY TAG IMAGE ID CREATED SIZE without-optimizations latest 45671929c8e4 2 minutes ago 1.07GB original latest f1363df79c8a 27 hours ago 356MB
Mana allinchasqa siq'iqa 714 MB aswan hatunmi ñawpaq kaqmanta, kayqa 200% hatun kaynin yapakuyninmi . Kayqa sut'ita rikuchin mayk'a importante kaqta Dockerfile
allinchay , aswan hatun siq'ikuna aswan pachata hapin ruwanankupaq chaymanta aswan disk espaciota mikhunku.
.dockerignore
willañiqiqa Git nisqap llamk'achisqan .gitignore
willañiqimanmi rikch'akun. Willañiqikunata, willañiqikunatapas ruranap ukhunmanta qarqunapaqmi llamk'achisqa. Contexto nisqaqa willañiqikunap, willañiqikunap huñusqanmi, Docker supayman kachasqa, siq'ita ruraspa. Contexto Docker daemonman tarball hina kachasqa, chayrayku atikuq hina huch'uylla waqaychayqa ancha allinmi.
Sichus, imaraykupas, mana .dockerignore
willañiqita llamk'apuyniykipi kanchu, makiwan ruwayta atinki. Sugeriykimanmi Rails .dockerignore
nisqa archivopa plantilla oficialninta huk qallariy hina llamk'achinaykipaq. Uraypiqa huk ejemplon kashan imaynachus kanman chayta.
# See https://docs.docker.com/engine/reference/builder/#dockerignore-file for more about ignoring files. # Ignore git directory. /.git/ /.gitignore # Ignore bundler config. /.bundle # Ignore all environment files. /.env* # Ignore all default key files. /config/master.key /config/credentials/*.key # Ignore all logfiles and tempfiles. /log/* /tmp/* !/log/.keep !/tmp/.keep # Ignore pidfiles, but keep the directory. /tmp/pids/* !/tmp/pids/.keep # Ignore storage (uploaded files in development and any SQLite databases). /storage/* !/storage/.keep /tmp/storage/* !/tmp/storage/.keep # Ignore assets. /node_modules/ /app/assets/builds/* !/app/assets/builds/.keep /public/assets # Ignore CI service files. /.github # Ignore development files /.devcontainer # Ignore Docker-related files /.dockerignore /Dockerfile*
.dockerfile
willañiqita llamk'aypi kayninqa mana mana necesario willañiqikunata chaymanta directoriokunata (kayhina, GitHub llamkanakuna .github
qillqana mayt'umanta utaq JavaScript hapipakuykuna node_modules
kaqmanta ) contextomanta qarquyllatachu saqin. Yanapallantaqmi mana qunqayllamanta chay siq’iman sensibles willakuykunata yapanapaq. Ejemplopaq, .env
willañiqi mayqinchus muyuriq tikraqkunayuq utaq master.key
willañiqi mayqinchus riqsichiykunata sut'inchanapaq llamk'achkan.
Llapan allinchakuykuna hawapi rimasqanchikqa sut’i hinam kanman sut’inchasqa kaptin. ¿Imatataq ruwanayki sichus hatun rikchayniyuqña kanki, manataq maymanta qallarinaykita yachankichu?
Aswan munasqay hinaspa aswan allin yanapakuyniyqa Buceo . Dive huk TUI yanapakuymi Docker siq'ita maskanapaq, qatapa kaqninkunata, chaymanta siq'i sayayninta pisiyachinapaq imaynakuna tarinapaq. Dive llamkana paquete kamachiqniykiwan churasqa kanman, utaq Docker oficial siq'inta llamk'achiy atikunki chayta purichinaykipaq. Aswan mana allin escenarionchismanta imagenta utilizasun.
docker run --rm -it -v /var/run/docker.sock:/var/run/docker.sock wagoodman/dive:latest without-optimizations
Hawa pantalla hap'iypi, qhawayta atikunki ñuqaykupa aswan mana allin siq'iykumanta. Buceo nisqapiqa sapa qatapa hatun kaynintam, siq'ip tukuy sayaynintam, sapa qatapi tikrasqa (yapachisqa, tikrasqa icha qullusqa) willañiqikunatapas rikuchin. Ñoqapaqqa kaymi Dive nisqapa aswan allin ruwaynin. Paña panelpi willañiqikunata listaspaqa, mana necesitakuq willañiqikunata mana sasachakuspalla riqsiyta atinki, chaymanta siq'iman yapaq kamachiykunata hurquyta atinki.
Huk imapas Dive kaqmanta chiqamanta munakuni chaymi, huk terminal UIyuq kasqanmanta hawa, chaymanta huk CI-amigo lluqsiyta quyta atin, mayqinchus huk llaqta wiñachiypipas allin kanman. Chayta llamk'achinapaq, Buceo purichiy CI
muyuriq tikraqwan true
kaqman churasqa , kamachiypa lluqsiyninqa uray pantalla hap'iypi kachkan.
docker run -e CI=true --rm -it -v /var/run/docker.sock:/var/run/docker.sock wagoodman/dive:latest without-optimizations
Kikiypa munasqayqa Dive llamk'achiyta huk programasqa kaqpi, kayhina, huk kuti semanapi, siq'ikuna allin formapiraq kasqankuta qhawanapaq. Hamuq qillqakunapi, Dockerfileyta qhawanaypaq llamk'achisqay makiwan ruwasqa llamkanakuna llamk'achisaq, Dive chaymanta Hadolint kaqwan.
Huk enfoque siq'i sayayninta pisiyachinapaq mayqinchus rikurqani, capas squash ruwayta kallpachakuy. Chay yuyayqa achka qatakunata huklla qataman huñuymi karqan, siq'ipa hatun kayninta pisiyachinapaq. Docker huk experimental akllanayuq karqan --squash
, kaymanta hawa, kimsa kaq yanapakuykuna karqan docker-squash hina.
Kay ruwayqa ñawpaqpi llamk’arqan chaypas, kunan pachaqa manaña llamk’achisqachu, manataq llamk’achiyta allinchu. Qatakuna llalliyqa Dockerpa qata waqaychaypa fundamental ruwayninta chinkachirqa. Chaymanta wak, --squash
llamk'achkaspa mana yuyaypi ñawpaq qatakunamanta sensitivo utaq pachapaq willañiqikunata qhipa siq'ipi churayta atiwaq. Kayqa tukuy imayuq utaq mana imapas ruwaymi, mana allin granuyuq controlniyuq.
Qatakunata llallinamantaqa, achka etapayuq ruwaykunata llamk'achinapaqmi. Rails Dockerfile
achka etapa ruwaykunata llamk'achinña, qatiq qillqasqapi imayna llamk'asqanmanta sut'inchasaq.
Docker siq'ikunata allinchay, huk allinchay hina, mana huk kuti ruwayta atikunmanchu chaymanta qunqasqa . Chayqa puririq ruwaymi, sapa kutinmi qhawarina, allinchana ima. Kallpancharqanim aswan allin kaqkunamanta rimanaypaq, ichaqa ancha allinmi yachanapaq hinaspa entiendenapaq. Qatiq qillqakunapi, aswan ñawpaq ruwanakuna chaymanta yanapakuykuna Docker ruwasqayki aswan utqaylla chaymanta aswan allin ruwanapaq yanapakunman.