Skip to content

Instantly share code, notes, and snippets.

@margaret
Last active August 22, 2018 18:19
Show Gist options
  • Save margaret/ac79bbab2234143d08abf605e9eddad5 to your computer and use it in GitHub Desktop.
Save margaret/ac79bbab2234143d08abf605e9eddad5 to your computer and use it in GitHub Desktop.

Revisions

  1. margaret revised this gist Apr 18, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion README.md
    Original file line number Diff line number Diff line change
    @@ -15,4 +15,4 @@ Running `docker-compose build` and then `docker-compose run dev` from inside the

    Can change the `FROM` image to some other Linux-based box that suits your application (python, node, jupyter, etc).

    For reasons I have yet determined, running `docker-compose up` instead of `docker-compose run dev` hangs at `Attaching to foo` (OS X Sierra, docker-compose version 1.11.2, build dfed245, Docker version 17.03.1-ce, build c6d412e). There's a bunch of bug reports that are fairly recent where people have this same issue.
    You have to do `docker-compose run` instead of `docker-compose up` if you want an interactive session, because `up` is meant to run multiple containers.
  2. margaret revised this gist Apr 18, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion README.md
    Original file line number Diff line number Diff line change
    @@ -13,6 +13,6 @@ Structure:

    Running `docker-compose build` and then `docker-compose run dev` from inside the `whales` directory will run the container and then drop you into the `src` directory. Any files you have in the `foo` directory on your host machine will be shared with the `foo` directory in the container with git and emacs installed.

    Should change the `FROM` image to something that suits your application (python, node, jupyter, etc).
    Can change the `FROM` image to some other Linux-based box that suits your application (python, node, jupyter, etc).

    For reasons I have yet determined, running `docker-compose up` instead of `docker-compose run dev` hangs at `Attaching to foo` (OS X Sierra, docker-compose version 1.11.2, build dfed245, Docker version 17.03.1-ce, build c6d412e). There's a bunch of bug reports that are fairly recent where people have this same issue.
  3. margaret revised this gist Apr 18, 2017. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@

    Simple example for creating a Docker image for development.

    From a directory setup like
    Structure:
    ```
    /whales
    /foo
    @@ -11,7 +11,7 @@ From a directory setup like
    Dockerfile
    ```

    Running `docker-compose build` and then `docker-compose run dev` will run the container and then drop you into the `src` directory. Any files you have in the `foo` directory on your host machine will be shared with the `foo` directory in the container with git and emacs installed.
    Running `docker-compose build` and then `docker-compose run dev` from inside the `whales` directory will run the container and then drop you into the `src` directory. Any files you have in the `foo` directory on your host machine will be shared with the `foo` directory in the container with git and emacs installed.

    Should change the `FROM` image to something that suits your application (python, node, jupyter, etc).

  4. margaret created this gist Apr 18, 2017.
    10 changes: 10 additions & 0 deletions Dockerfile
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    FROM debian:jessie

    RUN mkdir /src

    WORKDIR /src

    RUN apt-get update --fix-missing && \
    apt-get -y --force-yes install emacs git

    ENTRYPOINT /bin/bash
    18 changes: 18 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    # Simple docker-compose setup

    Simple example for creating a Docker image for development.

    From a directory setup like
    ```
    /whales
    /foo
    ...
    docker-compose.yml
    Dockerfile
    ```

    Running `docker-compose build` and then `docker-compose run dev` will run the container and then drop you into the `src` directory. Any files you have in the `foo` directory on your host machine will be shared with the `foo` directory in the container with git and emacs installed.

    Should change the `FROM` image to something that suits your application (python, node, jupyter, etc).

    For reasons I have yet determined, running `docker-compose up` instead of `docker-compose run dev` hangs at `Attaching to foo` (OS X Sierra, docker-compose version 1.11.2, build dfed245, Docker version 17.03.1-ce, build c6d412e). There's a bunch of bug reports that are fairly recent where people have this same issue.
    10 changes: 10 additions & 0 deletions docker-compose.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    version: '3'

    services:
    dev:
    build:
    context: .
    container_name: foo
    volumes:
    - ./foo:/src/foo
    stdin_open: true