Last active
May 16, 2017 16:45
-
-
Save lukaszsagol/66c37de5347a541d57baa78500315eb2 to your computer and use it in GitHub Desktop.
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
# What we want to use as a base of our container. | |
# We all know Ubuntu, so why not. | |
FROM ubuntu:14.04 | |
# Some locale setting business, better to have it than not. | |
ENV DEBIAN_FRONTEND=noninteractive | |
RUN locale-gen en_GB.UTF-8 | |
ENV LANG en_GB.UTF-8 | |
ENV LANGUAGE en_GB:en | |
ENV LC_ALL en_GB.UTF-8 | |
# Update what's there, and install make. | |
RUN apt-get update -qq && apt-get install -y build-essential | |
# Copy shared make definitions. We use them to define | |
# a generalised interface for updating/installing packages. | |
# (apt.mk) | |
COPY makedeps/shared /code/makedeps/shared | |
# Copy and run all the makefiles needed. | |
# First in line: base, including some utils. | |
COPY makedeps/base-build /code/makedeps/base-build | |
RUN cd /code/makedeps/base-build && make base-repos base-build-deps | |
# Next: postgres client | |
COPY makedeps/postgres /code/makedeps/postgres | |
RUN cd /code/makedeps/postgres && make postgres-repos postgres-build-deps | |
# Then: node runtime | |
COPY makedeps/node /code/makedeps/node | |
RUN cd /code/makedeps/node && make node-repos node-build-deps | |
# Finally: elixir! | |
COPY makedeps/elixir /code/makedeps/elixir | |
RUN cd /code/makedeps/elixir && make elixir-repos elixir-build-deps | |
# After all that is done, we only need to bring all the code | |
# into the container. | |
COPY ./ /code | |
WORKDIR /code | |
# And run final setup tasks (taking care of things like | |
# npm install and mix deps.get) | |
CMD make elixir-setup && make node-setup |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment