Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix docker commands #49

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mbochnak-sumo
Copy link

  • fix docker build command in README.md
  • fix dockerfile

Before:

  1. incorrect command in README.md:
$ docker build --load -t mkdocs .
unknown flag: --load
See 'docker build --help'.
  1. Wrong formatting in Dockerfile:
$ docker build -t mkdocs .
[+] Building 2.0s (7/9)
 => [internal] load build definition from Dockerfile                                                                                                                                                                                                   0.0s
 => => transferring dockerfile: 667B                                                                                                                                                                                                                   0.0s
 => [internal] load .dockerignore                                                                                                                                                                                                                      0.0s
 => => transferring context: 2B                                                                                                                                                                                                                        0.0s
 => [internal] load metadata for docker.io/circleci/python:3.9                                                                                                                                                                                         1.8s
 => [1/6] FROM docker.io/circleci/python:3.9@sha256:1cdee732a8e950196ef3f46b3122149ee3c2ef75b3d8e1ac34be90573c6660a8                                                                                                                                   0.0s
 => CACHED [2/6] RUN pip install mkdocs pymdown-extensions pygments                                                                                                                                                                                    0.0s
 => CACHED [3/6] WORKDIR /tmp                                                                                                                                                                                                                          0.0s
 => ERROR [4/6] RUN git clone https://github.com/pagerduty/mkdocs-theme-pagerduty  cd mkdocs-theme-pagerduty && python3 setup.py install
------
 > [4/6] RUN git clone https://github.com/pagerduty/mkdocs-theme-pagerduty  cd mkdocs-theme-pagerduty && python3 setup.py install:
#7 0.178 fatal: Too many arguments.
  1. wrong permissions in Dockerfile:
$ docker build -t mkdocs .
[+] Building 1.5s (9/11)
 => [internal] load build definition from Dockerfile                                                                                                                                                                                                   0.0s
 => => transferring dockerfile: 675B                                                                                                                                                                                                                   0.0s
 => [internal] load .dockerignore                                                                                                                                                                                                                      0.0s
 => => transferring context: 2B                                                                                                                                                                                                                        0.0s
 => [internal] load metadata for docker.io/circleci/python:3.9                                                                                                                                                                                         0.8s
 => [1/8] FROM docker.io/circleci/python:3.9@sha256:1cdee732a8e950196ef3f46b3122149ee3c2ef75b3d8e1ac34be90573c6660a8                                                                                                                                   0.0s
 => CACHED [2/8] RUN pip install mkdocs pymdown-extensions pygments                                                                                                                                                                                    0.0s
 => CACHED [3/8] WORKDIR /tmp                                                                                                                                                                                                                          0.0s
 => CACHED [4/8] RUN git clone https://github.com/pagerduty/mkdocs-theme-pagerduty                                                                                                                                                                     0.0s
 => CACHED [5/8] WORKDIR /tmp/mkdocs-theme-pagerduty                                                                                                                                                                                                   0.0s
 => ERROR [6/8] RUN python3 setup.py install
------
 > [6/8] RUN python3 setup.py install:
#9 0.450 running install
#9 0.522 error: can't create or remove files in install directory
  1. wrong permissions in Dockerfile:
$ docker build -t mkdocs .
[+] Building 1.9s (11/11) FINISHED
 => [internal] load build definition from Dockerfile                                                                                                                                                                                                   0.0s
 => => transferring dockerfile: 682B                                                                                                                                                                                                                   0.0s
 => [internal] load .dockerignore                                                                                                                                                                                                                      0.0s
 => => transferring context: 2B                                                                                                                                                                                                                        0.0s
 => [internal] load metadata for docker.io/circleci/python:3.9                                                                                                                                                                                         0.8s
 => [1/8] FROM docker.io/circleci/python:3.9@sha256:1cdee732a8e950196ef3f46b3122149ee3c2ef75b3d8e1ac34be90573c6660a8                                                                                                                                   0.0s
 => CACHED [2/8] RUN pip install mkdocs pymdown-extensions pygments                                                                                                                                                                                    0.0s
 => CACHED [3/8] WORKDIR /tmp                                                                                                                                                                                                                          0.0s
 => CACHED [4/8] RUN git clone https://github.com/pagerduty/mkdocs-theme-pagerduty                                                                                                                                                                     0.0s
 => CACHED [5/8] WORKDIR /tmp/mkdocs-theme-pagerduty                                                                                                                                                                                                   0.0s
 => [6/8] RUN python3 setup.py install --user                                                                                                                                                                                                          0.8s
 => [7/8] WORKDIR /docs                                                                                                                                                                                                                                0.0s
 => ERROR [8/8] RUN useradd -m --uid 1000 mkdocs                                                                                                                                                                                                       0.2s
------
 > [8/8] RUN useradd -m --uid 1000 mkdocs:
#10 0.192 useradd: Permission denied.
#10 0.192 useradd: cannot lock /etc/passwd; try again later.

After

$ docker build -t mkdocs .
[+] Building 0.9s (12/12) FINISHED
 => [internal] load build definition from Dockerfile                                                                                                                                                                                                   0.0s
 => => transferring dockerfile: 722B                                                                                                                                                                                                                   0.0s
 => [internal] load .dockerignore                                                                                                                                                                                                                      0.0s
 => => transferring context: 2B                                                                                                                                                                                                                        0.0s
 => [internal] load metadata for docker.io/circleci/python:3.9                                                                                                                                                                                         0.8s
 => [1/8] FROM docker.io/circleci/python:3.9@sha256:1cdee732a8e950196ef3f46b3122149ee3c2ef75b3d8e1ac34be90573c6660a8                                                                                                                                   0.0s
 => CACHED [2/8] RUN pip install mkdocs pymdown-extensions pygments                                                                                                                                                                                    0.0s
 => CACHED [3/8] WORKDIR /tmp                                                                                                                                                                                                                          0.0s
 => CACHED [4/8] RUN git clone https://github.com/pagerduty/mkdocs-theme-pagerduty                                                                                                                                                                     0.0s
 => CACHED [5/8] WORKDIR /tmp/mkdocs-theme-pagerduty                                                                                                                                                                                                   0.0s
 => CACHED [6/8] RUN python3 setup.py install                                                                                                                                                                                                          0.0s
 => CACHED [7/8] WORKDIR /docs                                                                                                                                                                                                                         0.0s
 => CACHED [8/8] RUN useradd -m --uid 1000 mkdocs                                                                                                                                                                                                      0.0s
 => exporting to image                                                                                                                                                                                                                                 0.0s
 => => exporting layers                                                                                                                                                                                                                                0.0s
 => => writing image sha256:615b67cf9ea557319df1a872fdbde2990dc20b35082e1cb5c04c75a5b7fc3401                                                                                                                                                           0.0s
 => => naming to docker.io/library/mkdocs

        - fix docker build command in README.md
        - fix dockerfile
@mbochnak-sumo mbochnak-sumo changed the title Fix docker commands: Fix docker commands Jul 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant