diff --git a/docker-compose.md b/docker-compose.md index 1b94175bb..00fc2c64f 100644 --- a/docker-compose.md +++ b/docker-compose.md @@ -16,6 +16,9 @@ version: '2' services: web: build: . + # build from Dockerfile + context: ./Path + dockerfile: Dockerfile ports: - "5000:5000" volumes: diff --git a/dockerfile.md b/dockerfile.md index 6c58b9494..8ed25b663 100644 --- a/dockerfile.md +++ b/dockerfile.md @@ -30,6 +30,16 @@ RUN bundle install WORKDIR /myapp ``` +``` +VOLUME ["/data"] +# Specification for mount point +``` + +```docker +ADD file.xyz /file.xyz +COPY --chown=user:group host_file.xyz /path/container_file.xyz +``` + ### Onbuild ```bash @@ -44,6 +54,37 @@ EXPOSE 5900 CMD ["bundle", "exec", "rails", "server"] ``` +### Entrypoint + +```docker +ENTRYPOINT ["executable", "param1", "param2"] +ENTRYPOINT command param1 param2 +``` + +Configures a container that will run as an executable. + +```docker +ENTRYPOINT exec top -b +``` + +This will use shell processing to substitute shell variables, and will ignore any `CMD` or `docker run` command line arguments. + +### Metadata + +```docker +LABEL version="1.0" +``` + +```docker +LABEL "com.example.vendor"="ACME Incorporated" +LABEL com.example.label-with-value="foo" +```docker + +```docker +LABEL description="This text illustrates \ +that label-values can span multiple lines." +``` + ## See also {: .-one-column}