-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
3 changed files
with
12 additions
and
12 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 |
---|---|---|
@@ -1,15 +1,14 @@ | ||
FROM ruby:3-alpine | ||
RUN apk add --no-cache make gcc libc-dev | ||
RUN echo -e "#!/bin/sh\ncd /nanoleaf;./main.rb >> /var/log/nanoleaf" > /etc/periodic/15min/nanoleaf | ||
RUN chmod +x /etc/periodic/15min/nanoleaf | ||
RUN adduser -DHu 1001 nanoleaf | ||
RUN touch /var/log/nanoleaf; chown 1001 /var/log/nanoleaf | ||
FROM alpine | ||
RUN apk add --no-cache make gcc libc-dev ruby-dev ruby-bundler && \ | ||
echo -e "#!/bin/sh\ncd /nanoleaf;./main.rb >> /var/log/nanoleaf" > /etc/periodic/15min/nanoleaf && \ | ||
chmod +x /etc/periodic/15min/nanoleaf && \ | ||
adduser -DHu 1001 nanoleaf && \ | ||
touch /var/log/nanoleaf; chown 1001 /var/log/nanoleaf | ||
WORKDIR /nanoleaf | ||
RUN chown 1001 . | ||
USER 1001 | ||
COPY --chown=1001 ["main.rb", "Gemfile", "effect.json", "/nanoleaf/"] | ||
ENV HOME="/tmp/" | ||
ENV GEM_HOME="/nanoleaf/vendor/bundle" | ||
ENV PATH $GEM_HOME/bin:$GEM_HOME/gems/bin:$PATH | ||
RUN bundle install | ||
RUN bundle install --jobs=4 | ||
CMD ./main.rb >> /var/log/nanoleaf & tail -F /var/log/nanoleaf |
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 |
---|---|---|
|
@@ -4,3 +4,4 @@ source 'https://rubygems.org' | |
|
||
gem 'color-converter' | ||
gem 'oga' | ||
gem 'json' |
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