Skip to content

Instantly share code, notes, and snippets.

@curtiszimmerman
Last active July 14, 2016 21:38
Show Gist options
  • Save curtiszimmerman/119cecedba73afca11ff122aef74e58e to your computer and use it in GitHub Desktop.
Save curtiszimmerman/119cecedba73afca11ff122aef74e58e to your computer and use it in GitHub Desktop.
Sample Non-working Compose
# Dockerfile
FROM ubuntu
RUN apt-get update -y && \
apt-get install traceroute && \
rm -rf /var/lib/apt/lists/*
RUN mkdir /test
COPY entrypoint.sh /test
# docker-compose.yml
version: "2"
services:
testing:
image: "wdtest"
container_name: "wdtest"
command: "docker"
entrypoint: "./entrypoint.sh"
working_dir: /test
# entrypoint.sh
#!/bin/bash
command=$1
if [[ $1 -eq "docker" ]]; then
output=$(traceroute docker.com)
else
output=$(traceroute example.com)
fi
echo ${output} > /test/output.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment