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

[Bug]: env: can't execute 'bash': No such file or directory #1115

Closed
GuillaumeRossolini opened this issue Oct 17, 2022 · 3 comments · Fixed by #1121
Closed

[Bug]: env: can't execute 'bash': No such file or directory #1115

GuillaumeRossolini opened this issue Oct 17, 2022 · 3 comments · Fixed by #1121
Assignees
Labels
bug docker needs triage Waiting for discussion / prioritization by team
Milestone

Comments

@GuillaumeRossolini
Copy link

Steps to Reproduce

Get the source code, run docker build -f docker/Dockerfile.step-ca.hsm .

Your Environment

  • OS: Raspberry Pi OS Lite (September 22nd 2022) - Debian bullseye
  • step-ca Version: v0.22.1

Expected Behavior

Env should be using the system's default shell, which in the case of this Dockerfile, is sh for golang:alpine.

Actual Behavior

env: can't execute 'bash': No such file or directory

...
(51/53) Installing ccid (1.5.0-r0)
(52/53) Installing py3-ykman (4.0.7-r0)
(53/53) Installing yubikey-manager (4.0.7-r0)
Executing busybox-1.35.0-r17.trigger
Executing eudev-3.2.11-r0.trigger
OK: 194 MiB in 76 packages
Removing intermediate container ead807b72f5c
 ---> 46353c8c62cb
Step 6/25 : RUN make V=1 GOFLAGS="" download
 ---> Running in 50bdffe045cf
env: can't execute 'bash': No such file or directory
TRAVIS_TAG is
GITHUB_REF is
VERSION is
DEB_VERSION is
PUSHTYPE is branch
go mod download
...

Additional Context

$ sudo docker version
Client:
 Version:           20.10.5+dfsg1
 API version:       1.41
 Go version:        go1.15.15
 Git commit:        55c4c88
 Built:             Mon May 30 18:34:49 2022
 OS/Arch:           linux/arm64
 Context:           default
 Experimental:      true

Server:
 Engine:
  Version:          20.10.5+dfsg1
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.15.15
  Git commit:       363e9a8
  Built:            Mon May 30 18:34:49 2022
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          1.4.13~ds1
  GitCommit:        1.4.13~ds1-1~deb11u2
 runc:
  Version:          1.0.0~rc93+ds1
  GitCommit:        1.0.0~rc93+ds1-5+deb11u2
 docker-init:
  Version:          0.19.0
  GitCommit:

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@GuillaumeRossolini GuillaumeRossolini added bug needs triage Waiting for discussion / prioritization by team labels Oct 17, 2022
@tashian tashian added the docker label Oct 17, 2022
maraino added a commit that referenced this issue Oct 19, 2022
@maraino
Copy link
Contributor

maraino commented Oct 19, 2022

Hi @GuillaumeRossolini, I think the problem is caused by the .version.sh script, that uses bash by default, I believe this simple PR will fix your issue PR #1121

@maraino maraino added this to the v0.23.0 milestone Oct 19, 2022
@GuillaumeRossolini
Copy link
Author

@maraino Shouldn't the build fail at that point?

@maraino
Copy link
Contributor

maraino commented Oct 20, 2022

@maraino Shouldn't the build fail at that point?

I thought so, but $(shell command) doesn't make the Makefile to fail:

$ cat Makefile
FOO=$(shell foo)
foo:
	@echo ${FOO}
	@echo "bar"

.PHONY: foo
$ make foo
make: foo: Command not found

bar
$ echo $?
0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug docker needs triage Waiting for discussion / prioritization by team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants