aboutsummaryrefslogtreecommitdiff
path: root/Dockerfile
blob: fa658de875ac4b54f2a09c7c720c3d0a490b1a38 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
FROM alpine:3.4

########################################
# System Stuff
########################################

# Add the testing repo to get neovim
RUN echo "http://dl-4.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
RUN echo "http://dl-4.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories
# Install all the needed packages
RUN apk add --no-cache \
      # My Stuff
      bash \
      unibilium \
      php5 \
      php5-json \
      php5-phar \
      php5-openssl \
      curl \
      git \
      ack \
      python \
      python-dev \
      python3 \
      python3-dev \
      nodejs \
      neovim \
      neovim-doc \
      ctags \
      vimdiff \
      # Needed for python pip installs
      musl-dev \ 
      gcc \
      # Needed for infocmp and tic
      ncurses

########################################
# PHP
########################################

# Download composer and move it to new location
RUN curl -sS https://getcomposer.org/installer | php
RUN mv composer.phar /usr/local/bin/composer
# Update the path to include composer bins
ENV PATH "$PATH:/root/.composer/vendor/bin"
# Composer install Code Sniff
RUN composer global require "squizlabs/php_codesniffer=*"
# Install Symfony 2 coding standard
RUN composer global require --dev escapestudios/symfony2-coding-standard:~2.0
# Add Symfony 2 coding standard to the phpcs paths
RUN phpcs --config-set installed_paths /root/.composer/vendor/escapestudios/symfony2-coding-standard
# Install custom linting
ADD PEARish.xml /root/PEARish.xml

########################################
# Python
########################################

# Install python linting and neovim plugin
RUN python -m ensurepip
RUN pip install neovim jedi flake8 flake8-docstrings flake8-isort flake8-quotes pep8-naming pep257 isort
RUN pip3 install neovim jedi flake8 flake8-docstrings flake8-isort flake8-quotes pep8-naming pep257 isort

########################################
# Shellcheck
########################################

# Copy over the shellcheck binaries
COPY package/bin/shellcheck /usr/local/bin/
COPY package/lib/           /usr/local/lib/
RUN ldconfig /usr/local/lib

########################################
# Javscript
########################################
# Install nodejs linting
# Install JS linting modules
# Install sass linting
RUN npm install -g \
      eslint@\^3.14.0 eslint-config-airbnb-base eslint-plugin-import eslint-plugin-vue \
      sass-lint@\^1.10.2
# Install the eslintrc.js
ADD eslintrc.js /root/.eslintrc.js
# Install the sass-lint.yaml
ADD sass-lint.yaml /root/.sass-lint.yaml


########################################
# Personalizations
########################################
# Add some aliases
ADD bashrc /root/.bashrc
# Add my git config
ADD gitconfig /etc/gitconfig
# Change the workdir, Put it inside root so I can see neovim settings in finder
WORKDIR /root/app
# Better terminal support
ENV TERM screen-256color
# Neovim needs this so that <ctrl-h> can work
RUN infocmp $TERM | sed 's/kbs=^[hH]/kbs=\\177/' > /tmp/$TERM.ti
RUN tic /tmp/$TERM.ti
# Command for the image
CMD ["/bin/bash"]
# Add nvim config. Put this last since it changes often
ADD nvim /root/.config/nvim
# Install neovim Modules
RUN nvim +PlugInstall +qall
RUN nvim +UpdateRemotePlugins +qall
# Add flake8 config, don't trigger a long build process
ADD flake8 /root/.flake8
# Add local vim-options, can override the one inside
ADD vim-options /root/.config/nvim/plugged/vim-options
# Add isort config, also changes often
ADD isort.cfg /root/.isort.cfg