Dockerized

This commit is contained in:
Aart van Halteren
2018-03-19 16:18:56 +01:00
parent 619107a303
commit 625fd06a0f
6 changed files with 74 additions and 29 deletions

20
Dockerfile Normal file
View File

@@ -0,0 +1,20 @@
FROM ruby:2.4.3
ENV BUILD_PACKAGES="apt-utils build-essential curl less nodejs sudo wget zsh libmysqlclient-dev ruby-serialport libserialport-dev"
# throw errors if Gemfile has been modified since Gemfile.lock
RUN \
bundle config --global frozen 1
WORKDIR /usr/src/app
COPY Gemfile Gemfile.lock ./
RUN \
apt-get update -qq && \
apt-get install -y $BUILD_PACKAGES && \
bundle install
COPY . .
CMD ["cd /usr/src/app && ruby smartmeter.rb"]