LayerCI Docker Compose Example

FROM vm/ubuntu:18.04

# install docker-ce (from tutorial for ubuntu)
RUN apt-get update && \
    apt-get install apt-transport-https ca-certificates curl software-properties-common && \
    curl -fsSL | apt-key add - && \
    add-apt-repository "deb [arch=amd64] bionic stable" && \
    apt-get update && \
    apt install docker-ce awscli

# install docker compose
RUN curl -L "$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose && \
    chmod +x /usr/local/bin/docker-compose

# copy the root (i.e., repository root) to /root in the runner
COPY / /root

# TODO: log in to docker hub
# See to learn how to log in to docker

RUN REPEATABLE docker-compose build --parallel
RUN docker-compose up -d

# BUTTON shows a button and pauses the pipeline until it is pressed.
BUTTON Deploy this pipeline

RUN echo "For AWS the command might look like this:"
RUN echo awscli deploy --template-file my-file.yaml
RUN echo "Note that these commands only run if you click the button on the LayerCI dashboard."
Try this example live