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

Why is this version so old? #155

Open
RichardJECooke opened this issue Sep 13, 2023 · 12 comments
Open

Why is this version so old? #155

RichardJECooke opened this issue Sep 13, 2023 · 12 comments
Assignees
Labels
question Further information is requested

Comments

@RichardJECooke
Copy link

Docker in snap is version 20. The latest Docker official is version 24. Why is this app so old in snap? I thought snaps were supposed to be kept up to date with the latest stable version of all apps

@jocado
Copy link
Contributor

jocado commented Sep 27, 2023

I can't give the any eta, but there is an open PR for a branch that updates to version 24, #152 , when that is merged it will partially solve this issue. It still has to be promoted to stable, and I don't know if there will be any channel changes to support the significant version bump.

@wordjelly
Copy link

Hi,
With the latest version of golang, all docker compose commands fail, because this snap includes docker 20. The issue is resolved in docker 24.x . Can I please request you to merge this commit at soonest and push the snap to the central repository. This has started breaking all docker compose files, across installations and platforms.

@jocado
Copy link
Contributor

jocado commented Oct 4, 2023

CC @lucaskanashiro and @xnox for visibility, and in case they can provide any further info.

@jocado
Copy link
Contributor

jocado commented Oct 4, 2023

BTW - @wordjelly , if the Golang issue you're referring to is related to this, then a fix for that was already backported.

It should be in the snap channel latest/candidate if you want try or test that.

@wordjelly
Copy link

wordjelly commented Oct 4, 2023

@jocado sorry, that throws the same error, I'm giving latest/edge a try. Will update on progress soon.

@wordjelly
Copy link

wordjelly commented Oct 4, 2023

It works with latest/edge. For anyone hitting 'invalid host header' do this :

sudo snap remove docker --purge

sudo snap install docker --channel=latest/edge

@jocado
Copy link
Contributor

jocado commented Oct 4, 2023

Strange, perhaps I had the incorrect revision info. Glad that works for you at least, and thanks for confirming 👍

@lucaskanashiro
Copy link
Contributor

@wordjelly could you please share any error log from your attempts of using docker compose? How did you install docker compose? Are you using the command provided by the snap? I'd like to understand a bit better what is happening here.

And version 24.x should be pushed to the edge channel as soon as we promote the current beta to candidate and then stable. There is some internal testing going on right now.

@wordjelly
Copy link

wordjelly commented Oct 5, 2023

@lucaskanashiro , thank you for the update, I've tried to include a reproducible setup for this problem below:

# Install docker from snap
sudo snap install docker
# add the user to the docker group(the usual stuff that needs to be done to avoid the permission issue with the docker socket).. I won't mention that here.

Create a dummy project with a docker-compose.yml that MUST Reference a Dockerfile in the build step.
Kindly note that the problem emerges only when defining services that use a Dockerfile in the build step:

# Create a new directory as a test case.
mkdir debug_docker_snap_issue
cd debug_docker_snap_issue
pico docker-compose.yml

Contents of docker-compose.yml

version: '3'
services:
  nodejs_test:
    network_mode: "host"
    build:
      dockerfile: Dockerfile
    ports:
      - "8080:8080"
    volumes:
      - .:/home/node/app

Contents of Dockerfile

FROM ubuntu:22.04

RUN mkdir -p /home/node/app/node_modules

WORKDIR /home/node/app

RUN apt-get update && apt-get install -y python3 build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev nodejs npm

Then run

docker compose up nodejs_test

The build will fail with "http: invalid host header".

Kindly note that, this issue seems to have cropped up for a lot of people in the last 48 hours. I have no clue how docker works, but it seems, it internally updated its golang version yesterday. I had a perfectly working setup with the same snap, just 72 hours ago.
Here is a link from stackoverflow to another person who seems to have the same problem (not using snap though) : Docker Nodejs fails with invalid http host header

@RawToast
Copy link

@lucaskanashiro if it helps, I have the same issue and checked this PR/repository after reading up on this issue in another issue, it seems there are fixes in later versions that are missing for compose to function with golang > 1.20:

moby/moby#46614 (comment)

@locnnil locnnil self-assigned this Oct 8, 2024
@locnnil
Copy link
Contributor

locnnil commented Oct 8, 2024

As the current version of the snap in stable is 24.0.5 and the upcoming version in beta is 27.2.0, may I consider this close?

@locnnil locnnil added the question Further information is requested label Oct 8, 2024
@alexhaydock
Copy link

As the current version of the snap in stable is 24.0.5 and the upcoming version in beta is 27.2.0, may I consider this close?

I don't think so. Although the original ticket was opened to point out the lack of Docker 24.x, the original question of 'Why is this version so old?' is still relevant today.

Based on the upstream support matrix for Docker Engine (aka Moby), there is no upstream support for Docker 24.x anymore.

I'm not 100% sure where the specific date has been sourced, but endoflife.date lists 24.x as unsupported as of June 2024.

Is there a particular reason why the stable branch for the Snap is so far behind?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

7 participants