Last active
August 29, 2015 14:18
-
-
Save alexlafroscia/67e1b4d72938b32b2dd3 to your computer and use it in GitHub Desktop.
Dockerfile for running the 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
# ===================================================================== | |
# Commands | |
# | |
# Build the image | |
# docker run build | |
# | |
# Run the server | |
# docker run --name ember -v $(pwd):/usr/src/app -P ember server | |
# | |
# ===================================================================== | |
# Base image | |
FROM node | |
# Setup commands, to install dependencies | |
RUN npm install -g [email protected] bower | |
# Ports to expose | |
# These ports will be exposed, but unpublished by default | |
# | |
# You still have to specify `-P` on the command line | |
# in order to _publish_ those ports to the "outside". | |
# | |
# The port that these will be mapped to is random. Check what | |
# they are using the `docker ps` command | |
EXPOSE 4200 35729 | |
# Directory to run commands in | |
WORKDIR /usr/src/app | |
# Binary to execute | |
ENTRYPOINT ["/usr/local/bin/ember"] | |
# Default parameters | |
CMD ["help"] |
What bothers me is that I initialized the project from inside the container, so it should have built with everything it needed to run.
I created a container, then from inside of it I ran ember new project-name
in a shared directory. This indicates to me that the Ember project init is broken for clean ubuntu images. I've confirmed this in Vagrant.
^^ them be fightin' words
Got it working. I'm going to have to take my own notes on this miserable setup process.
Part of my heart is screaming "Why don't I just automate it?"
I also got Hello Golang running in the browser. Next step is the reverse proxy. Not going to happen today.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm having some trouble with this. In particular, I'm getting this guy:
Cannot find module 'ember-cli/lib/broccoli/ember-app'
-- which should be fixable by running
npm install && bower install
from inside the ember project directory. But that means I need to mount the volume from the Dockerfile.I guess we didn't have this same project because you had already stored the dependencies in the shared directory by the time we started?
So I should be able to locally run npm install && bower install`, putting the deps locally, and then mount the shared volume with them on it already?