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

Setup help #101

Open
rhythmtone opened this issue Jun 9, 2023 · 1 comment
Open

Setup help #101

rhythmtone opened this issue Jun 9, 2023 · 1 comment

Comments

@rhythmtone
Copy link

rhythmtone commented Jun 9, 2023

It's hard to solve a problem when important details are missing, that why we added this template, to help you and us.

General informations

Docker host's operating system : Ubuntu MATE 22.04
Mysql Server version :

Docker informations

Docker compose version : Docker version 24.0.2, build cb74dfc
Docker version : Docker version 24.0.2, build cb74dfc

Problem's description

Hi,
I cannot get this set up - yes, I am new to this, but the documentation is confusing - what am I doing wrong to simply build the container? I have user other Docker containers before, but something is wrong with the commands for building this specific container, and I cannot understand what, see log below, thanks!

It errors out when trying to build the container from the /latest/ directory, or from the child directory, see below.

And I do not understand the syntax of this command in the instructions either, I have tried variations of it, does not make sense.
I have tried different paths and different arguments, cannot get it to work

docker build --rm -f "MY_TAG/Dockerfile" -t ocsinventory/ocsinventory-docker-image:MY_TAG "MY_TAG"

So I tried to do it from the actual /latest/ directory and also the child directory, did not work,
Thanks for any help

administrator@DO-SVR-R220:~$ git clone https://github.com/OCSInventory-NG/OCSInventory-Docker-Image
Cloning into 'OCSInventory-Docker-Image'...
remote: Enumerating objects: 742, done.
remote: Counting objects: 100% (339/339), done.
remote: Compressing objects: 100% (152/152), done.
remote: Total 742 (delta 171), reused 285 (delta 148), pack-reused 403
Receiving objects: 100% (742/742), 203.72 KiB | 2.51 MiB/s, done.
Resolving deltas: 100% (393/393), done.
administrator@DO-SVR-R220:~$ cd OCSInventory-Docker-Image/
administrator@DO-SVR-R220:~/OCSInventory-Docker-Image$ ls
2.10  2.11  2.5  2.6  2.7  2.8  2.8.1  2.9  2.9.2  dev  latest  LICENSE  nightly  README.md  setup.sh
administrator@DO-SVR-R220:~/OCSInventory-Docker-Image$ cd latest
administrator@DO-SVR-R220:~/OCSInventory-Docker-Image/latest$ ls
conf  docker-compose.yml  docker-entrypoint.d  docker-entrypoint.sh  Dockerfile  nginx  sql
administrator@DO-SVR-R220:~/OCSInventory-Docker-Image/latest$ sudo docker build - < Dockerfile
[+] Building 0.9s (14/14) FINISHED
 => [internal] load build definition from Dockerfile                                                                                                                                                                                                                                                                    0.0s
 => => transferring dockerfile: 2.48kB                                                                                                                                                                                                                                                                                  0.0s
 => [internal] load .dockerignore                                                                                                                                                                                                                                                                                       0.0s
 => => transferring context: 2B                                                                                                                                                                                                                                                                                         0.0s
 => [internal] load metadata for docker.io/library/ubuntu:22.04                                                                                                                                                                                                                                                         0.0s
 => CACHED [ 1/10] FROM docker.io/library/ubuntu:22.04                                                                                                                                                                                                                                                                  0.0s
 => [internal] load build context                                                                                                                                                                                                                                                                                       0.0s
 => => transferring context: 2B                                                                                                                                                                                                                                                                                         0.0s
 => CANCELED [ 2/10] RUN ln -snf /usr/share/zoneinfo/Europe/Paris /etc/localtime && echo Europe/Paris > /etc/timezone                                                                                                                                                                                                   0.7s
 => CACHED [ 3/10] RUN apt-get update && apt-get install -y     wget     curl     make     perl     apache2     php     libxml-simple-perl     libdbi-perl     libdbd-mysql-perl     libapache-dbi-perl     libnet-ip-perl     libsoap-lite-perl     libarchive-zip-perl     libswitch-perl     libmojolicious-perl     0.0s
 => CACHED [ 4/10] RUN wget https://github.com/OCSInventory-NG/OCSInventory-ocsreports/releases/download/2.11.0/OCSNG_UNIX_SERVER-2.11.0.tar.gz -P /tmp &&     tar xzf /tmp/OCSNG_UNIX_SERVER-2.11.0.tar.gz -C /tmp;                                                                                                    0.0s
 => CACHED [ 5/10] RUN cd /tmp/OCSNG_UNIX_SERVER-2.11.0/Apache/ &&     perl Makefile.PL &&     make &&     make install                                                                                                                                                                                                 0.0s
 => CACHED [ 6/10] WORKDIR /etc/apache2/conf-available                                                                                                                                                                                                                                                                  0.0s
 => CACHED [ 7/10] RUN ln -sf /proc/self/fd/1 /var/log/apache2/access.log &&     ln -sf /proc/self/fd/2 /var/log/apache2/error.log                                                                                                                                                                                      0.0s
 => ERROR [ 8/10] COPY conf/ /tmp/conf                                                                                                                                                                                                                                                                                  0.0s
 => ERROR [ 9/10] COPY ./docker-entrypoint.sh /docker-entrypoint.sh                                                                                                                                                                                                                                                     0.0s
 => ERROR [10/10] COPY ./docker-entrypoint.d /docker-entrypoint.d                                                                                                                                                                                                                                                       0.0s
------
 > [ 8/10] COPY conf/ /tmp/conf:
------
------
 > [ 9/10] COPY ./docker-entrypoint.sh /docker-entrypoint.sh:
------
------
 > [10/10] COPY ./docker-entrypoint.d /docker-entrypoint.d:
------
Dockerfile:68
--------------------
  66 |
  67 |     COPY ./docker-entrypoint.sh /docker-entrypoint.sh
  68 | >>> COPY ./docker-entrypoint.d /docker-entrypoint.d
  69 |
  70 |     EXPOSE 80
--------------------
ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref f1deb7d6-46f2-494a-bdd9-1852a064839f::ph9qnp8zitp2egmqhybbrs0fk: "/docker-entrypoint.d": not found
administrator@DO-SVR-R220:~/OCSInventory-Docker-Image/latest$ ^C
administrator@DO-SVR-R220:~/OCSInventory-Docker-Image/latest$ cd ..
administrator@DO-SVR-R220:~/OCSInventory-Docker-Image$ sudo docker build -f latest\Dockerfile
ERROR: "docker buildx build" requires exactly 1 argument.
See 'docker buildx build --help'.

Usage:  docker buildx build [OPTIONS] PATH | URL | -

Start a build
@rhythmtone rhythmtone changed the title Setup helo Setup help Jun 9, 2023
@rhythmtone
Copy link
Author

So I got this to work with the syntax below, from the actual /latest/ folder but I still don't understand how to do it properly - could someone please explain what I am missing about the syntax?

administrator@DO-SVR-R220:~/OCSInventory-Docker-Image/latest$ sudo docker build . -t ocs:latest
[+] Building 0.1s (15/15) FINISHED
 => [internal] load build definition from Dockerfile                                                                                                                                                                                                                                                                    0.0s
 => => transferring dockerfile: 2.48kB                                                                                                                                                                                                                                                                                  0.0s
 => [internal] load .dockerignore                                                                                                                                                                                                                                                                                       0.0s
 => => transferring context: 2B                                                                                                                                                                                                                                                                                         0.0s
 => [internal] load metadata for docker.io/library/ubuntu:22.04                                                                                                                                                                                                                                                         0.0s
 => [ 1/10] FROM docker.io/library/ubuntu:22.04                                                                                                                                                                                                                                                                         0.0s
 => [internal] load build context                                                                                                                                                                                                                                                                                       0.0s
 => => transferring context: 567B                                                                                                                                                                                                                                                                                       0.0s
 => CACHED [ 2/10] RUN ln -snf /usr/share/zoneinfo/Europe/Paris /etc/localtime && echo Europe/Paris > /etc/timezone                                                                                                                                                                                                     0.0s
 => CACHED [ 3/10] RUN apt-get update && apt-get install -y     wget     curl     make     perl     apache2     php     libxml-simple-perl     libdbi-perl     libdbd-mysql-perl     libapache-dbi-perl     libnet-ip-perl     libsoap-lite-perl     libarchive-zip-perl     libswitch-perl     libmojolicious-perl     0.0s
 => CACHED [ 4/10] RUN wget https://github.com/OCSInventory-NG/OCSInventory-ocsreports/releases/download/2.11.0/OCSNG_UNIX_SERVER-2.11.0.tar.gz -P /tmp &&     tar xzf /tmp/OCSNG_UNIX_SERVER-2.11.0.tar.gz -C /tmp;                                                                                                    0.0s
 => CACHED [ 5/10] RUN cd /tmp/OCSNG_UNIX_SERVER-2.11.0/Apache/ &&     perl Makefile.PL &&     make &&     make install                                                                                                                                                                                                 0.0s
 => CACHED [ 6/10] WORKDIR /etc/apache2/conf-available                                                                                                                                                                                                                                                                  0.0s
 => CACHED [ 7/10] RUN ln -sf /proc/self/fd/1 /var/log/apache2/access.log &&     ln -sf /proc/self/fd/2 /var/log/apache2/error.log                                                                                                                                                                                      0.0s
 => CACHED [ 8/10] COPY conf/ /tmp/conf                                                                                                                                                                                                                                                                                 0.0s
 => CACHED [ 9/10] COPY ./docker-entrypoint.sh /docker-entrypoint.sh                                                                                                                                                                                                                                                    0.0s
 => CACHED [10/10] COPY ./docker-entrypoint.d /docker-entrypoint.d                                                                                                                                                                                                                                                      0.0s
 => exporting to image                                                                                                                                                                                                                                                                                                  0.0s
 => => exporting layers                                                                                                                                                                                                                                                                                                 0.0s
 => => writing image sha256:24078b0399af1d89fa478e74209dabef8608db76eb33ecd054470cc5051b18c0                                                                                                                                                                                                                            0.0s
 => => naming to docker.io/library/ocs:latest                                                                                                                                                                                                                                                                           0.0s
administrator@DO-SVR-R220:~/OCSInventory-Docker-Image/latest$ sudo docker images
REPOSITORY                 TAG       IMAGE ID       CREATED         SIZE
ocs                        latest    24078b0399af   2 minutes ago   550MB
oxidized/oxidized          latest    24a04441edb5   2 weeks ago     1.06GB
win10-2                    latest    fe58e8c5402b   4 weeks ago     44.5GB
vm-inst                    latest    55b2af986255   4 weeks ago     1.68GB
ubuntukvm18-04-installed   latest    3e19ae66ec0e   4 weeks ago     37.4GB
ubuntu                     22.04     08d22c0ceb15   3 months ago    77.8MB
ubuntu                     18.04     3941d3b032a8   3 months ago    63.1MB
administrator@DO-SVR-R220:~/OCSInventory-Docker-Image/latest$ 

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

No branches or pull requests

1 participant