Skip to content

Commit

Permalink
feat(flake8): install linter
Browse files Browse the repository at this point in the history
Update ruby, node and use alpine base image
  • Loading branch information
blackjid committed Sep 6, 2019
1 parent a0f85a4 commit 3c42c98
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.4.1
2.4.7
28 changes: 7 additions & 21 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,31 +1,17 @@
FROM ruby:2.4.1
FROM ruby:2.4.7-alpine3.10

RUN apt-get update && apt-get install -y apt-transport-https \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# Add node source
RUN curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
RUN echo 'deb https://deb.nodesource.com/node_8.x jessie main' > /etc/apt/sources.list.d/nodesource.list
RUN echo 'deb-src https://deb.nodesource.com/node_8.x jessie main' >> /etc/apt/sources.list.d/nodesource.list

# Add yarn source
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN echo 'deb https://dl.yarnpkg.com/debian/ stable main' > /etc/apt/sources.list.d/yarn.list

RUN apt-get update && apt-get install -y --no-install-recommends \
locales \
RUN apk add \
python3 \
nodejs \
yarn \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

RUN localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8
ENV LC_ALL en_US.UTF-8
alpine-sdk

RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app

COPY requirements.txt /usr/src/app
RUN pip3 install -r requirements.txt

COPY Gemfile /usr/src/app/
COPY Gemfile.lock /usr/src/app/
RUN bundle install
Expand Down
2 changes: 0 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
source "https://rubygems.org"

ruby "2.4.1"

gem "flog"
gem "haml_lint"
gem "rake"
Expand Down
3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
"name": "linters",
"version": "1.0.0",
"description": "Use Node for JS based linters",
"engines": {
"node": "^8.4.0"
},
"dependencies": {
"babel-eslint": "^8.0.1",
"coffeelint": "^1.15.7",
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
flake8==3.3.0
flake8==3.7.8

0 comments on commit 3c42c98

Please sign in to comment.