Merge pull request #35 from TheBay0r/docker-handles-dependencies

Docker should handle installing dependencies
pull/42/head
Mike Heijmans 2017-06-23 21:48:12 -05:00 committed by GitHub
commit de63f29d8a
2 changed files with 17 additions and 10 deletions

View File

@ -6,13 +6,13 @@ FROM ruby:2.3.1
MAINTAINER Mike Heijmans <parabuzzle@gmail.com>
# Add env variables
ENV PORT 80
ENV REGISTRY_HOST localhost
ENV REGISTRY_PORT=5000
ENV REGISTRY_PROTO=https
ENV REGISTRY_SSL_VERIFY=true
ENV REGISTRY_ALLOW_DELETE=false
ENV APP_HOME=/webapp
ENV PORT=80 \
REGISTRY_HOST=localhost \
REGISTRY_PORT=5000 \
REGISTRY_PROTO=https \
REGISTRY_SSL_VERIFY=true \
REGISTRY_ALLOW_DELETE=false \
APP_HOME=/webapp
RUN mkdir -p $APP_HOME
# switch to the application directory for exec commands
@ -21,6 +21,16 @@ WORKDIR $APP_HOME
# Add the app
ADD . $APP_HOME
RUN apt-get update && \
apt-get install python-software-properties -y && \
curl -sL https://deb.nodesource.com/setup_8.x | bash - && \
apt-get install nodejs -y && \
npm install && \
node_modules/.bin/webpack && \
rm -rf node_modules && \
apt-get purge nodejs python-software-properties -y && \
rm -rf /var/lib/apt/lists/*
RUN gem update bundler
RUN bundle install

View File

@ -34,9 +34,6 @@ end
desc "Build Container"
task :build do
sh "npm install"
sh "npm install webpack"
sh "node_modules/webpack/bin/webpack.js"
sh "docker build -t parabuzzle/craneoperator:latest ."
end