Last active
July 14, 2016 21:38
-
-
Save curtiszimmerman/119cecedba73afca11ff122aef74e58e to your computer and use it in GitHub Desktop.
Sample Non-working Compose
This file contains hidden or 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
# 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