Skip to content

Instantly share code, notes, and snippets.

@sawa2d2
Last active May 12, 2020 03:36
Show Gist options
  • Select an option

  • Save sawa2d2/07818b94c2bd4de606ed3bca523776de to your computer and use it in GitHub Desktop.

Select an option

Save sawa2d2/07818b94c2bd4de606ed3bca523776de to your computer and use it in GitHub Desktop.
Dockerfiles

Directory configuration

project-root/
├── app/
└── Dockerfile

Usage

docker build -t [CONTAINER_NAME] .
docker run -it --rm -v $PWD/app:/workdir [CONTAINER_NAME] /bin/bash
FROM node:14
RUN apt-get update \
&& npm install -g @google/clasp -g \
WORKDIR /workdir
VOLUME /workdir
SHELL ["/bin/bash", "-c"]
# If you only want to start interactive interpreter session with ghci, just execute a command below:
# ```
# $ docker run -it --rm haskell:8
# ```
FROM haskell:8
WORKDIR /workdir
VOLUME /workdir
SHELL ["/bin/bash", "-c"]
# Graphviz
docker pull graphviz/graphviz
FROM ubuntu
RUN apt-get update \
&& apt-get install -y curl python \
&& curl -s https://shopify.github.io/themekit/scripts/install.py | python
WORKDIR /workdir
VOLUME /workdir
SHELL ["/bin/bash", "-c"]
FROM php:5.6-cli
RUN apt-get update \
&& apt-get install -y curl python \
&& curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar \
&& php wp-cli.phar --info \
&& chmod +x wp-cli.phar \
&& mv wp-cli.phar /usr/local/bin/wp \
&& wp cli version --allow-root
WORKDIR /workdir
VOLUME /workdir
SHELL ["/bin/bash", "-c"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment