-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
7 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
||
|