Skip to content

Instantly share code, notes, and snippets.

@iliakg
Last active December 30, 2022 00:27
Show Gist options
  • Save iliakg/b923854c0e967251cc515fdefbacf430 to your computer and use it in GitHub Desktop.
Save iliakg/b923854c0e967251cc515fdefbacf430 to your computer and use it in GitHub Desktop.
docker image with elixir, docker, docker-compose
# docker image with elixir, docker, docker-compose
FROM elixir:1.9.4
RUN set -ex \
&& export DOCKER_VERSION=$(curl --silent --fail --retry 3 https://download.docker.com/linux/static/stable/x86_64/ | grep -o -e 'docker-[.0-9]*\.tgz' | sort -r | head -n 1) \
&& DOCKER_URL="https://download.docker.com/linux/static/stable/x86_64/${DOCKER_VERSION}" \
&& echo Docker URL: $DOCKER_URL \
&& curl --silent --show-error --location --fail --retry 3 --output /tmp/docker.tgz "${DOCKER_URL}" \
&& ls -lha /tmp/docker.tgz \
&& tar -xz -C /tmp -f /tmp/docker.tgz \
&& mv /tmp/docker/* /usr/bin \
&& rm -rf /tmp/docker /tmp/docker.tgz
RUN curl -L https://github.com/docker/compose/releases/download/1.25.5/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose \
&& chmod +x /usr/local/bin/docker-compose
CMD mix -v && docker version && docker info && docker-compose -v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment