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: dockerfile with debian image won't run #135

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

Conversation

PabloLION
Copy link

@PabloLION PabloLION commented May 29, 2024

Description

When I tried to claim the FLT, I found that the docker throws an error on "docker build -t dev-reward-script ." (see the error message below)
This PR addresses issues related to package management security warnings and overall Docker image size by switching our base image from python:3.10 (Debian-based) to python:3.10-alpine. Alpine Linux offers a smaller footprint and fewer security vulnerabilities, making it a more suitable choice for our production environment.

Changes Made

  • Changed the base image in our Dockerfile to python:3.10-alpine.
  • Replaced apt-get commands with apk add to accommodate the Alpine package manager.

Error

Environment

Mac Studio with macOS 14.1.1 (23B81)
Docker version 20.10.11, build dea9396

error message
docker build -t dev-reward-script .

[+] Building 2.3s (8/10)                                                                                                                                                                                                                                                
 => [internal] load build definition from Dockerfile                                                                                                                                                                                                               0.0s
 => => transferring dockerfile: 309B                                                                                                                                                                                                                               0.0s
 => [internal] load .dockerignore                                                                                                                                                                                                                                  0.0s
 => => transferring context: 67B                                                                                                                                                                                                                                   0.0s
 => [internal] load metadata for docker.io/library/python:3.10                                                                                                                                                                                                     1.1s
 => [internal] load build context                                                                                                                                                                                                                                  0.1s
 => => transferring context: 227.01kB                                                                                                                                                                                                                              0.0s
 => CACHED [1/6] FROM docker.io/library/python:3.10@sha256:817c0d8684087acb6d88f0f0951f9a541aa3e762302aa5e8f439d5d12edd48ad                                                                                                                                        0.0s
 => [2/6] COPY . /claim                                                                                                                                                                                                                                            0.1s
 => [3/6] WORKDIR /claim                                                                                                                                                                                                                                           0.0s
 => ERROR [4/6] RUN apt update && apt install age && apt clean                                                                                                                                                                                                     0.9s
------                                                                                                                                                                                                                                                                  
 > [4/6] RUN apt update && apt install age && apt clean:                                                                                                                                                                                                                
#8 0.550                                                                                                                                                                                                                                                                
#8 0.550 WARNING: apt does not have a stable CLI interface. Use with caution in scripts.                                                                                                                                                                                
#8 0.550                                                                                                                                                                                                                                                                
#8 0.683 Get:1 http://deb.debian.org/debian bookworm InRelease [151 kB]                                                                                                                                                                                                 
#8 0.712 Get:2 http://deb.debian.org/debian bookworm-updates InRelease [55.4 kB]
#8 0.728 Get:3 http://deb.debian.org/debian-security bookworm-security InRelease [48.0 kB]
#8 0.788 Err:1 http://deb.debian.org/debian bookworm InRelease
#8 0.788   At least one invalid signature was encountered.
#8 0.830 Err:2 http://deb.debian.org/debian bookworm-updates InRelease
#8 0.830   At least one invalid signature was encountered.
#8 0.870 Err:3 http://deb.debian.org/debian-security bookworm-security InRelease
#8 0.870   At least one invalid signature was encountered.
#8 0.887 Reading package lists...
#8 0.909 W: GPG error: http://deb.debian.org/debian bookworm InRelease: At least one invalid signature was encountered.
#8 0.909 E: The repository 'http://deb.debian.org/debian bookworm InRelease' is not signed.
#8 0.909 W: GPG error: http://deb.debian.org/debian bookworm-updates InRelease: At least one invalid signature was encountered.
#8 0.909 E: The repository 'http://deb.debian.org/debian bookworm-updates InRelease' is not signed.
#8 0.909 W: GPG error: http://deb.debian.org/debian-security bookworm-security InRelease: At least one invalid signature was encountered.
#8 0.909 E: The repository 'http://deb.debian.org/debian-security bookworm-security InRelease' is not signed.
------
executor failed running [/bin/sh -c apt update && apt install age && apt clean]: exit code: 100

TLDR

At first I tried to do it manually but later on I see ChatGPT can fix this. Here's another version of the installation wih package manager.

RUN apk update && \
    apk add --no-cache curl gnupg age

It took me a few days for the procrastination to fix this and I missed half of the airdrop (2500FLT) 😅
Is there anyway to claim it back?

@CLAassistant
Copy link

CLAassistant commented May 29, 2024

CLA assistant check
All committers have signed the CLA.

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.

2 participants