Created
December 28, 2017 00:07
-
-
Save simonihmig/4d9531dc41a61e54ef1291f96546d26a to your computer and use it in GitHub Desktop.
Ember-CLI Docker setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3" | |
services: | |
# for development only | |
ember-cli: | |
build: docker/ember-cli | |
shm_size: 1G | |
command: /bin/bash -c "FASTBOOT_DISABLED=true ember server" | |
ports: | |
- 4200:4200 | |
- 49152:49152 | |
- 49153:49153 | |
volumes: | |
- .:/web |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:8 | |
# Note: npm is v2.15.11 | |
RUN apt-get install tar bzip2 curl | |
RUN npm install -g --silent ember-cli | |
# install watchman | |
# Note: See the README.md to find out how to increase the | |
# fs.inotify.max_user_watches value so that watchman will | |
# work better with ember projects. | |
RUN git clone https://github.com/facebook/watchman.git && \ | |
cd watchman && \ | |
git checkout v3.5.0 && \ | |
./autogen.sh && \ | |
./configure && \ | |
make && \ | |
make install | |
RUN echo 'deb http://dl.google.com/linux/chrome/deb/ stable main' >> /etc/apt/sources.list | |
RUN wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | apt-key add - | |
RUN apt-get update && apt-get install -y google-chrome-stable | |
# ember server on port 4200 | |
# livereload server on port 49152 | |
EXPOSE 4200 49152 | |
RUN mkdir /web | |
WORKDIR /web | |
# Use user inherited from node image. | |
# This allows files created in the docker environment to | |
# be editable by the host machine user | |
USER node | |
COPY start.sh /usr/local/bin/ | |
ENTRYPOINT ["/usr/local/bin/start.sh"] | |
# run ember server on container start | |
CMD ["ember", "server"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
cd /web | |
yarn install | |
exec "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment