Skip to content

Commit

Permalink
Base docker image on alpine
Browse files Browse the repository at this point in the history
  • Loading branch information
nning committed Mar 17, 2019
1 parent 41b719e commit 8c13dd8
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,22 @@
# docker build -t transmission-rss --build-arg UID=1337 --build-arg GID=1337 .
# docker run -it -v $(pwd)/transmission-rss.conf:/etc/transmission-rss.conf transmission-rss

FROM ruby:latest
FROM ruby:alpine
MAINTAINER henning mueller <[email protected]>

ARG UID=1000
ARG GID=1000

RUN \
useradd -m ruby && \
sed -i "s/1000:1000/$UID:$GID/" /etc/passwd && \
sed -i "s/1000/$GID/" /etc/group && \
chown -R ruby:ruby /home/ruby
addgroup -g $GID ruby && \
adduser -u $UID -G ruby -D ruby && \
apk --no-cache --update add build-base libffi-dev

USER ruby

WORKDIR home/ruby
ADD . transmission-rss
RUN chown -R ruby:ruby transmission-rss
COPY . transmission-rss

USER ruby
WORKDIR transmission-rss
RUN bundle

Expand Down

0 comments on commit 8c13dd8

Please sign in to comment.