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: Notify user to restart docker engine, allow pre-release for docker compose #2377

Merged
merged 3 commits into from
Aug 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cli/cmd/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ func validateStackNameAvailable(ctx context.Context, stackService *stackservice.
if meta.AppName == happyClient.HappyConfig.App() {
return nil
}
return errors.Errorf("this stack exists, but in a different app ('%s')", meta.AppName)
return errors.Errorf("this stack exists, but in a different app ('%s'), you cannot manipulate it from this app", meta.AppName)
}
}

Expand Down
2 changes: 1 addition & 1 deletion examples/nodejs_downstream/backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 1. update this base image tag to update the base image
# 2. update this path based on the name of your stack (ie. /stackname/envname/servicename)
FROM 401986845158.dkr.ecr.us-west-2.amazonaws.com/test1/rdev/base:v1.0.1
FROM ACCOUNTID.dkr.ecr.us-west-2.amazonaws.com/test1/rdev/base:v1.0.1
COPY ./ ./
RUN npm install
CMD [ "node", "app.js" ]
4 changes: 3 additions & 1 deletion shared/util/preconditions.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"github.com/docker/docker/client"
"github.com/hashicorp/go-multierror"
"github.com/pkg/errors"
log "github.com/sirupsen/logrus"
)

type ValidationCallback = func(context.Context) error
Expand Down Expand Up @@ -63,7 +64,7 @@ func ValidateDockerInstalled(ctx context.Context) error {
func ValidateMinDockerComposeVersion(ctx context.Context) error {
var errs *multierror.Error

dockerComposeMinVersion, err := semver.NewConstraint(">= v2")
dockerComposeMinVersion, err := semver.NewConstraint(">= v2.0.0-0")
if err != nil {
return errors.Wrap(err, "could not establish docker compose version")
}
Expand Down Expand Up @@ -130,6 +131,7 @@ func ValidateDockerEngineRunning(ctx context.Context) error {
errs = multierror.Append(errs, errors.Wrap(err, "docker engine is not running, follow https://docs.docker.com/get-docker/"))
}

log.Debug("checking docker engine is running; if the process freezes up, please restart docker engine")
_, err = client.ContainerList(ctx, types.ContainerListOptions{})
if err != nil {
errs = multierror.Append(errs, errors.Wrap(err, "cannot connect to docker engine"))
Expand Down
Loading