Import debian packages and set environment variables for GR.rb
This commit is contained in:
11
Dockerfile
11
Dockerfile
@@ -1,6 +1,6 @@
|
|||||||
FROM ruby:2.7
|
FROM ruby:2.7
|
||||||
|
|
||||||
ENV BUILD_PACKAGES="apt-utils build-essential curl less nodejs sudo wget zsh libmariadb-dev libserialport-dev cron"
|
ENV BUILD_PACKAGES="apt-utils build-essential curl less nodejs sudo wget zsh libmariadb-dev libserialport-dev cron gr"
|
||||||
|
|
||||||
# throw errors if Gemfile has been modified since Gemfile.lock
|
# throw errors if Gemfile has been modified since Gemfile.lock
|
||||||
RUN \
|
RUN \
|
||||||
@@ -12,10 +12,17 @@ WORKDIR /usr/src/app
|
|||||||
COPY Gemfile Gemfile.lock ./
|
COPY Gemfile Gemfile.lock ./
|
||||||
|
|
||||||
RUN \
|
RUN \
|
||||||
|
echo 'deb http://download.opensuse.org/repositories/science:/gr-framework/Debian_11/ /' | tee /etc/apt/sources.list.d/science:gr-framework.list && \
|
||||||
|
curl -fsSL https://download.opensuse.org/repositories/science:gr-framework/Debian_11/Release.key | gpg --dearmor | tee /etc/apt/trusted.gpg.d/science_gr-framework.gpg > /dev/null && \
|
||||||
apt-get update -qq && \
|
apt-get update -qq && \
|
||||||
apt-get install -y $BUILD_PACKAGES && \
|
apt-get install -y $BUILD_PACKAGES && \
|
||||||
bundle install
|
bundle install
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
CMD ["ruby ./smartmeter.rb"]
|
# Set required variables for GR.rb
|
||||||
|
# see https://github.com/red-data-tools/GR.rb
|
||||||
|
ENV GRDIR="/usr/gr"
|
||||||
|
ENV GKS_WSTYPE=100
|
||||||
|
|
||||||
|
CMD ["/bin/bash -c ruby ./smartmeter.rb"]
|
||||||
|
|||||||
Reference in New Issue
Block a user