Skip to content

Instantly share code, notes, and snippets.

@mexisme
Last active September 21, 2022 16:54
Show Gist options
  • Save mexisme/ee438ee5539486409cd012d35c5907b8 to your computer and use it in GitHub Desktop.
Save mexisme/ee438ee5539486409cd012d35c5907b8 to your computer and use it in GitHub Desktop.
Alpine Linux Dockerfile, adds Ruby 2.2 using ruby-install
# Alpine with Ruby 2.2
FROM alpine:3.7
RUN apk upgrade --no-cache --update && \
apk add --no-cache --update ca-certificates make bash build-base
RUN cd /tmp && \
wget -O - https://github.com/postmodern/ruby-install/archive/v0.6.1.tar.gz | tar xzvf - && \
( cd ruby-install-0.6.1 && \
make install ) && \
rm -rf ruby-install-*
RUN ruby-install --cleanup ruby 2.2
RUN addgroup app && \
adduser -D -G app -h /app -s /bin/sh app
USER app
WORKDIR /app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment