File: Containerfile

package info (click to toggle)
podman 5.7.0%2Bds2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 23,824 kB
  • sloc: sh: 4,700; python: 2,798; perl: 1,885; ansic: 1,484; makefile: 977; ruby: 42; csh: 8
file content (21 lines) | stat: -rw-r--r-- 1,116 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# The resulting image can be used to generate podman-remote documentation.
#
# The CMD expects that the podman git repository is bind mounted to /podman.
# The generated documentation will be copied to ./docs/build/remote/.
#
# Example usage:
#   podman build --build-arg TARGET_OS=windows -t podman-docs-generator $(pwd)/docs
#   podman run --rm -v $(pwd):/podman podman-docs-generator
#
FROM docker.io/golang:latest
ARG TARGET_OS=windows # valid values: macos, linux, windows
RUN apt-get update && apt-get install -y pandoc man
RUN mkdir -p /podman-copy/podman
ENV TARGET_OS=$TARGET_OS
WORKDIR /podman-copy/podman
CMD echo "Copying /podman/ to /podman-copy/. It will take some time but 1) the build will be faster 2) the local bin folder won't be overridden." && \
    cp -a /podman/ /podman-copy/ && \
    echo "Generating docs" && make podman-remote-${TARGET_OS}-docs && \
    echo "Copying generated docs to /podman/" && mkdir -p /podman/docs/build/ && \
    mkdir -p /podman/docs/build/remote/ && \
    cp -a /podman-copy/podman/docs/build/remote/${TARGET_OS}/* /podman/docs/build/remote/