dockla.blogg.se

Universal media server docker
Universal media server docker








universal media server docker universal media server docker

Gpg -dearmor -o /usr/share/keyrings/postgres-archive-keyring.gpg \ Git # Install PostgreSQL dependencies ARG PG_MAJOR RUN curl -sSL | \ & DEBIAN_FRONTEND=noninteractive apt-get install -yq -no-install-recommends \ Rm -f /etc/apt//docker-clean \Įcho 'Binary::apt::APT::Keep-Downloaded-Packages "true" ' > /etc/apt//keep-cache \ # syntax=docker/dockerfile:1 ARG RUBY_VERSION ARG DISTRO_NAME=bullseye FROM ruby: $RUBY_VERSION-slim- $DISTRO_NAME ARG DISTRO_NAME # Common dependencies RUN -mount = type=cache,target=/var/cache/apt,sharing=locked \ -mount = type=cache,target=/var/lib/apt,sharing=locked \ -mount = type=tmpfs,target=/var/log \ This environment is where we’ll run servers, access the console ( rails c), perform tests, do Rake tasks, and otherwise interact with our code in any way as developers: The Dockerfile defines our Ruby application’s environment.

  • Introducing the Ruby on Whales interactive generator.
  • (Micro-)services vs Docker for development.
  • The basics: Dockerfile and docker-compose.yml.
  • The bulk of the post consists mostly of annotated code and configuration examples, structured as follows: The source code can be found in the evilmartians/ruby-on-whales repository on GitHub.īefore we get on with it, let’s note that we’ll be using up-to-date software versions for this example: Docker Desktop 20.10+ and Docker Compose v2, Ruby 3.1.0, PostgreSQL 14, etc. This post was originally adapted from my talk at RailsConf 2019: “Terraforming legacy Rails applications”. Along the way, I’ll explain almost every line (because we’ve all had enough of those cryptic tutorials that just assume you know stuff). With that out of the way, let me just go ahead and present the config itself. Since that first iteration of this post revealed my secret to the world, many Rails teams and devs have adopted my technique, and actually, they’ve helped to contribute and improve it!

    universal media server docker

    It took quite some time to develop a standard approach (as more formerly enshrined with the first release of this article in 2019). And something which was just good enough would not cut it. But don’t get the impression that this was an instant fix! I was in search of a configuration that was perfect for myself, my team, and well, everyone else. In 2017, I decided to make the switch to containers, and this was how I first began using Docker. So, where to start? This has been a pretty long journey: back in the day, I used to develop using Vagrant, but its VMs were a bit too heavy for my 4GB RAM laptop. Notice: This article is regularly updated with the best and latest recommendations for details, take a look at the Changelog. Read on to learn all the details, and feel free to use it, share it, and enjoy! This configuration came out of-and then further evolved-during production development at Evil Martians.

    universal media server docker

    This post introduces the Docker configuration I use for developing my Ruby on Rails projects.










    Universal media server docker