DockerFile

From DrewWiki
Revision as of 14:50, 30 January 2018 by Drew (talk | contribs) (added ADD COPY and RUN to example Dockerfile)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

WIP A very boring container that installs curl and npm.

Dockerfile

FROM ubuntu:16.04
MAINTAINER Drew Holt <[email protected]>

RUN apt-get update && apt-get install curl npm -y

ENV foo /bar
WORKDIR ${foo}   # WORKDIR /bar
ADD . $foo       # ADD . /bar
COPY \$foo /myapp # COPY $foo /myapp

RUN /myapp/myapp

Build contanier

docker build -t drewderivative/mycontainer:0.0.1

Run container

docker run -p 8000:8888 drewderivative/mycontainer:0.0.1