Giter VIP home page Giter VIP logo

dockerfiles's Introduction

Play With Docker Docker Hub

Dockerfiles

Finally, Dockerfiles!

Build Patterns

The recommendation is to use multistage builds and, apparently, they're now supported on the Docker Hub! But, you might still find a reason to write a goofy single-stage build.

apt-get

I forget where I first saw this pattern, but the idea is to install all of the packages, including dev/build packages, do the work, then mark all of the unnecessary packages as purgeable.

RUN apt-get update \
    && apt-get install -y --no-install-recommends \
        foo \
        bar \
        baz \
    && ... build commands... 
    && apt-mark auto '.*' > /dev/null \
    && apt-mark manual "bar" \
    && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
    && rm -fr /var/cache/apt/* /var/lib/apt/lists/*

apk

TBD!

dockerfiles's People

Contributors

anthonymastrean avatar

Watchers

 avatar  avatar

dockerfiles's Issues

Couldn't create temporary directory

With this in the Dockerfile

VOLUME ["/home/adom/.adom.data"]

I see this error

$ docker run -it --rm adom

 Ancient Domains Of Mystery -- Version 3.0.6
 (C) Copyright 1994-2018 Thomas Biskup.
 All Rights Reserved.

 <2018-02-06 21:23:27> WARN  : Couldn't create temporary directory '/home/adom/.adom.data/tmpdat' [IS].
 /*
  * ADOM session aborted due to an external problem.
  * Problem Description: Couldn't create temporary directory
                         '/home/adom/.adom.data/tmpdat' [IS].
  */

Can't open savefile directory

$ docker run -it --rm -v $HOME/.angband:/home/angband/.angband angband --help
Usage: angband [options] [-- subopts]
  -n             Start a new character (WARNING: overwrites default savefile without -u)
  -l             Lists all savefiles you can play
  -w             Resurrect dead character (marks savefile)
  -g             Request graphics mode
  -x<opt>        Debug options; see -xhelp
  -u<who>        Use your <who> savefile
  -d<dir>=<path> Override a specific directory with <path>. <path> can be:
    scores (default is /home/angband//.angband/Angband/scores)
    gamedata (default is /home/angband/etc/angband/gamedata)
    screens (default is /home/angband/share/angband/screens)
    help (default is /home/angband/share/angband/help)
    info (default is /home/angband//.angband/Angband/info)
    pref (default is /home/angband/etc/angband/customize)
    fonts (default is /home/angband/share/angband/fonts)
    tiles (default is /home/angband/share/angband/tiles)
    sounds (default is /home/angband/share/angband/sounds)
    icons (default is /home/angband/share/angband/icons)
    user (default is /home/angband//.angband/Angband)
    save (default is /home/angband//.angband/Angband/save)
                 Multiple -d options are allowed.
  -m<sys>        Use module <sys>, where <sys> can be:
     gcu   Text mode, subopts
              -a     Use ASCII walls
              -b     Big screen (equivalent to -n1)
              -B     Use brighter bold characters
              -nN    Use N terminals (up to 6)
$ docker run -it --rm -v $HOME/.angband:/home/angband/.angband angband -l
./games/angband: Can't open savefile directory

ADOM requires at least a 25x80 screen to run on.

$ docker run -it --rm adom

Ancient Domains Of Mystery -- Version 3.0.6
(C) Copyright 1994-2018 Thomas Biskup.
All Rights Reserved.

/*
 * ADOM session aborted due to an external problem.
 * Problem Description: ADOM requires at least a 25x80 screen to run on.
 */

Should we use VOLUME?

I can't tell if it does anything other than announce that the container should be run with a volume (docker run -v ...).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.