Chris creates a Docker environment for Standard which is a Ruby linter. Thank you to Test Double for creating Standard.
If you have any questions you would like answered or constructive feedback please send an email to ask@saturdaymp.com.
You can find my fork of the Standard repo here. Ideally all the files in the video would be in the repo but since we ignored the Docker files at a local level, they are listed below.
# Dockerfile
FROM ruby:3.2.2-alpine3.18
RUN apk update && \
apk upgrade && \
apk add --no-cache git build-base
# docker-compose.yml
services:
app:
build: .
entrypoint: /app/docker-entrypoint.sh
volumes:
- .:/app
- bundle-volume:/usr/local/bundle
ports:
- "1234:1234"
working_dir: /app
volumes:
bundle-volume:
# docker-entrypoint.sh
#!/bin/sh
set -e
bundle check || bundle install && bundle clean --force
exec "$@"
# .git/info/exclude
# File patterns to ignore; see `git help ignore` for more information.
# Lines that start with '#' are comments.
Dockerfile
docker-compose.yml
docker-entrypoint.sh
.idea/
Gemfile.lock