Skip to content

Commit 5dd8647

Browse files
author
js-jslog
committed
Reorder commands for future efficiency adding new templates
1 parent 6f8accd commit 5dd8647

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

Dockerfile

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,12 @@ ENV PATH=$NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH
1717
# at container creation time
1818
RUN mkdir -p /home/developer/
1919

20-
COPY dotfiles/.vimrc /root/.vimrc
21-
COPY dotfiles/.gitconfig /root/.gitconfig
22-
COPY dotfiles/.bash_aliases /root/.bash_aliases
23-
COPY dotfiles/.eslintrc.json /root/.eslintrc.json
24-
COPY dotfiles/jest.config.js /home/developer/jest.config.js
20+
# Replace shell with bash so we can source files
21+
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
2522

2623
LABEL maintainer="Joseph Sinfield <[email protected]>"
2724
LABEL runcommand="docker run --rm -ti -e http_proxy -e https_proxy -e HTTP_PROXY -e HTTPS_PROXY -e SSH_AUTH_SOCK=\$SSH_AUTH_SOCK -v $(dirname \$SSH_AUTH_SOCK):$(dirname \$SSH_AUTH_SOCK) -v $(pwd):/home/developer/workspace -w /home/developer/workspace jslog/development-env"
2825

29-
# Replace shell with bash so we can source files
30-
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
31-
3226
# Set debconf to run non-interactively
3327
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
3428

@@ -47,6 +41,7 @@ RUN apt-get update && apt-get install -y -q --no-install-recommends \
4741
&& rm -rf /var/lib/apt/lists/*
4842

4943
# Install vim and customise
44+
COPY dotfiles/.vimrc /root/.vimrc
5045
RUN add-apt-repository ppa:jonathonf/vim -y \
5146
&& apt update \
5247
&& apt install vim -y
@@ -63,18 +58,24 @@ RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.1/install.sh
6358
&& nvm alias default $NODE_VERSION \
6459
&& nvm use default
6560

66-
RUN source /root/.bashrc
67-
6861
# Install npm packages
62+
RUN source /root/.bashrc
6963
RUN npm install -g eslint \
7064
&& npm install -g eslint-config-airbnb-base \
7165
&& npm install -g eslint-plugin-import \
7266
&& npm install -g jest
7367

74-
# Copy project templates
68+
# Copy global dotfiles
69+
COPY dotfiles/.gitconfig /root/.gitconfig
70+
COPY dotfiles/.bash_aliases /root/.bash_aliases
71+
COPY dotfiles/.eslintrc.json /root/.eslintrc.json
72+
COPY dotfiles/jest.config.js /home/developer/jest.config.js
73+
RUN source /root/.bashrc
74+
75+
# Copy project templates with local dotfiles
7576
COPY templates/tdd/ /home/developer/templates/tdd/
7677
COPY dotfiles/jest.config.js /home/developer/templates/tdd/.
7778
COPY dotfiles/.gitignore /home/developer/templates/tdd/.
7879
COPY dotfiles/.eslintrc.json /home/developer/templates/tdd/.
7980

80-
LABEL version="1.1.2"
81+
LABEL version="1.1.3"

0 commit comments

Comments
 (0)