Open gopi-s-ht opened 2 months ago
Hey there, @gopi-s-ht! I'm a bot designed to help you with bugs, questions, and contributions. Feel free to ask for assistance while waiting for a human maintainer.
To resolve the Dockerfile parse error "Unknown flag: mount" on line 40 when running docker-compose -f docker-compose-non-dev.yml up
for Apache Superset on an AWS EC2 instance with Amazon Linux 2023 and Docker version 26.1.4, you need to ensure that BuildKit is enabled. The --mount
flag is supported in BuildKit, which is not enabled by default in some Docker installations.
You mentioned that you tried exporting DOCKER_BUILDKIT=1
but still encountered the same error. Here are a few additional steps to ensure BuildKit is properly enabled:
Set the Environment Variable:
Ensure that the DOCKER_BUILDKIT
environment variable is set to 1
in your current shell session:
export DOCKER_BUILDKIT=1
Verify Docker Configuration:
Check if BuildKit is enabled in your Docker configuration file (/etc/docker/daemon.json
). If not, add the following configuration:
{
"features": {
"buildkit": true
}
}
After making changes, restart the Docker service:
sudo systemctl restart docker
Run Docker Compose: Now, try running the Docker Compose command again:
docker-compose -f docker-compose-non-dev.yml up
If the issue persists, you can use an alternative Docker Compose configuration that does not rely on the --mount
flag. The Superset repository provides several configurations, including docker-compose-image-tag.yml
, which fetches and runs pre-built images from Docker Hub:
export TAG=3.1.1
docker-compose -f docker-compose-image-tag.yml up
This approach avoids the --mount
flag and should work without requiring BuildKit.
For more details, you can refer to the Superset documentation on Docker Compose configurations [1][2].
To continue talking to Dosu, mention @dosu.
My guess is that this is a docker / docker-compose version issue, please find the version you use, report back here (so we get a better understanding of what versions don't work), upgrade and retry.
@rusackas maybe we should merge this -> https://github.com/apache/superset/pull/29609, this way we can instruct people to run it, and tweak/adjust the known version ranges that work or don't work based on what contributors report in issues like this one.
@mistercrunch
Docker version 26.1.4, build 5650f9b
Docker Compose version v2.29.2
Oh looks like you're ahead of me, let me upgrade locally and run docker-compose build; docker-compose -f docker-compose-non-dev.yml up
I had to docker volume rm superset_db_home
for unrelated reasons, but docker-compose build; docker-compose -f docker-compose-non-dev.yml up
worked for me.
@dosu-bot can you provide some instructions about nuking docker cache and anything else that might be getting in the way here? It's a dev environment so it should be safe to reset things.
Sorry I couldn't help, but at least I upgrade my local docker setup - there are cool new features in how docker-compose integrates better with docker-desktop now.
@gopi-s-ht
To reolve you can try some of these steps :-
export DOCKER_BUILDKIT=1
export COMPOSE_DOCKER_CLI_BUILD=1
Bug description
I am following the steps mentioned in here. when using docker compose up, I am getting the error as below.
Tried exporting DOCKER_BUILDKIT=1 before running docker compose, still getting the same error.
I am using AWS EC2 instance size r5.large
Docker version: Docker version 26.1.4, build 5650f9b
OS: NAME="Amazon Linux" VERSION="2023" ID="amzn" ID_LIKE="fedora" VERSION_ID="2023" PLATFORM_ID="platform:al2023" PRETTY_NAME="Amazon Linux 2023.3.20240312" ANSI_COLOR="0;33" CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2023" HOME_URL="https://aws.amazon.com/linux/amazon-linux-2023/" DOCUMENTATION_URL="https://docs.aws.amazon.com/linux/" SUPPORT_URL="https://aws.amazon.com/premiumsupport/" BUG_REPORT_URL="https://github.com/amazonlinux/amazon-linux-2023" VENDOR_NAME="AWS" VENDOR_URL="https://aws.amazon.com/" SUPPORT_END="2028-03-15"
How to reproduce the bug
git clone --depth=1 https://github.com/apache/superset.git cd superset docker-compose -f docker-compose-non-dev.yml pull docker-compose -f docker-compose-non-dev.yml up
Screenshots/recordings
No response
Superset version
master / latest-dev
Python version
3.9
Node version
16
Browser
Chrome
Additional context
No response
Checklist