LombardiDaniel / ip-checker

simple script that notifies user on ip change
MIT License
0 stars 1 forks source link

Error at installation Execution #1

Open rclandrade opened 2 months ago

rclandrade commented 2 months ago

Daniel, thank you very much for this project, I am facing a difficulty at the installation of the docker container. I bring bellow the commands and outputs obtained:

pi@raspberrypi:~/Desktop/Update_ip $ docker-compose up -d Building requester Step 1/11 : FROM golang:1.22.3 AS builder 1.22.3: Pulling from library/golang dfc3b4ca6281: Pull complete 641d6443415d: Pull complete 94dd085f2eef: Pull complete a2791ef048a4: Pull complete 8bd578652b0f: Pull complete 019328b4b2c2: Pull complete 4f4fb700ef54: Pull complete Digest: sha256:f43c6f049f04cbbaeb28f0aad3eea15274a7d0a7899a617d0037aec48d7ab010 Status: Downloaded newer image for golang:1.22.3 ---> f27accdccc83 Step 2/11 : WORKDIR /cmd ---> Running in b1c7d2a6f8fe Removing intermediate container b1c7d2a6f8fe ---> 682d7b46784e Step 3/11 : COPY cmd/go.mod go.mod ---> c874723de28f Step 4/11 : RUN go mod download ---> Running in a91fe143b752 go: no module dependencies to download Removing intermediate container a91fe143b752 ---> b11572c6fd61 Step 5/11 : COPY cmd/ ./ ---> 803e3a69da61 Step 6/11 : RUN go build -o /bin/main main.go ---> Running in 3d898b3f8af8 Removing intermediate container 3d898b3f8af8 ---> c2225dee8fdc

Step 7/11 : FROM alpine:3.19.1 as server ERROR: Service 'requester' failed to build: Get "https://registry-1.docker.io/v2/": context deadline exceeded

Could it be any incompatibility with my OS or hardware? I have the newest version from GO installed. I am using a Pi3.

Appreciate the help, Best regards, Raphael Andrade

rclandrade commented 2 months ago

As an update I could set the Docker container after I changed the user for admin. Even tough I am now facing the following error:

root@raspberrypi:/home/pi/Desktop/Update_ip# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 199917c2de48 update_ip_requester "./main" 26 minutes ago Restarting (1) About a minute ago ip_checker root@raspberrypi:/home/pi/Desktop/Update_ip# docker logs -f ip_checker standard_init_linux.go:239: exec user process caused: exec format error standard_init_linux.go:239: exec user process caused: exec format error standard_init_linux.go:239: exec user process caused: exec format error standard_init_linux.go:239: exec user process caused: exec format error standard_init_linux.go:239: exec user process caused: exec format error standard_init_linux.go:239: exec user process caused: exec format error standard_init_linux.go:239: exec user process caused: exec format error standard_init_linux.go:239: exec user process caused: exec format error standard_init_linux.go:239: exec user process caused: exec format error standard_init_linux.go:239: exec user process caused: exec format error standard_init_linux.go:239: exec user process caused: exec format error root@raspberrypi:/home/pi/Desktop/Update_ip#

LombardiDaniel commented 2 months ago

I just re-built the image and it worked fine. There is also a public image: lombardi/ip-checker.

If you follow the .env.example model, it should be working correctly

rclandrade commented 2 months ago

@LombardiDaniel I found out that my error probably has to do with the architecture from my Pi3. [https://stackoverflow.com/questions/69739201/docker-error-standard-init-linux-go228-exec-user-process-caused-exec-format] Maybe I should build the Docker Image using the right architecture?

LombardiDaniel commented 2 months ago

Step 7/11 : FROM alpine:3.19.1 as server ERROR: Service 'requester' failed to build: Get "https://registry-1.docker.io/v2/": context deadline exceeded

this seems like an error regarding your docker installation or something of that nature. Did you try to pull the image?

Change your docker-compose.yml file to this:

version: "3.7"

services:
  requester:
    container_name: ip_checker
    image: lombardi/ip-checker:latest
    restart: unless-stopped
    volumes:
      - last_ip:/cmd/
    env_file:
      - .env

volumes:
  last_ip: