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

Dockerfile is not available on path --file docker/jetstream-controller/Dockerfile . #216

Open
Pratikt2312 opened this issue Jan 2, 2025 · 3 comments
Labels
defect Suspected defect such as a bug or regression

Comments

@Pratikt2312
Copy link

Pratikt2312 commented Jan 2, 2025

What version were you using?

I am trying on main branch and 0.16.1 version of nack.
nats-server versio which is given in go.mod (github.com/nats-io/nats-server/v2 v2.10.18)

What environment was the server running in?

Linux/ppc64le
(I want to build the images for ppc64le arch. as there is no official support.)

Is this defect reproducible?

Yes.
#install deps.
yum install git make gcc -y

#install required go version
GO_VERSION=1.22.2
wget https://golang.org/dl/go$GO_VERSION.linux-ppc64le.tar.gz &&
tar -C /usr/local -xzf go$GO_VERSION.linux-ppc64le.tar.gz &&
rm -rf go$GO_VERSION.linux-ppc64le.tar.gz
export GOROOT=/usr/local/go &&
export GOPATH=$HOME &&
export PATH=$GOPATH/bin:$GOROOT/bin:$PATH

#clone the repo.
git clone https://github.com/nats-io/nack
cd nack
make jetstream-controller-docker ver=0.16.1

Given the capability you are leveraging, describe your expectation?

The image should gets build when we execute the given target in Makefile ( with make jetstream-controller-docker)

ifneq ($(ver),)
	docker build --tag $(drepo)/jetstream-controller:$(ver) \
		--build-arg VERSION=$(ver) \
		--file docker/jetstream-controller/Dockerfile .
else
	# Missing version, try this.
	# make jetstream-controller-docker ver=1.2.3
	exit 1
endif```

### Given the expectation, what is the defect you are observing?

Given file path in Makefile target to build image from dockerfile is not present in the repository.

```--file docker/jetstream-controller/Dockerfile . ```

```jetstream-controller-docker:
ifneq ($(ver),)
	docker build --tag $(drepo)/jetstream-controller:$(ver) \
		--build-arg VERSION=$(ver) \
		--file docker/jetstream-controller/Dockerfile .
else
	# Missing version, try this.
	# make jetstream-controller-docker ver=1.2.3
	exit 1
endif```

please help us on how can we build these images from Makefile target, where we can find the dockerfiles. 
Thanks.
@Pratikt2312 Pratikt2312 added the defect Suspected defect such as a bug or regression label Jan 2, 2025
@Jarema
Copy link
Member

Jarema commented Jan 6, 2025

Hey.
Thanks for the report.
it seems that the Makefile was not udated after changes to the project structure.

@samuelattwood
Copy link
Member

samuelattwood commented Jan 6, 2025

Hi @Pratikt2312 - The issue with the targets should now be resolved in main.

To build for linux/ppc64le you will need to add - ppc64le to the goarch list in the .goreleaser.yaml otherwise the build will still fail, as goreleaser will not produce the required binary. I believe the jetstream-controller-docker Makefile target will otherwise work for PPC, though I have not tested it.

@Pratikt2312
Copy link
Author

Hi @samuelattwood @Jarema,
Thank you for the quick response and the updates. I was able to build and validate the images(0.16.1) on ppc64le after making a few adjustments. I noticed that the golang:1.23.4-bullseye image does not have Power support, so I made the necessary modifications and successfully built the images.
Could we expect Power support for this repository in the future? I would be happy to contribute towards adding support for ppc64le if needed.
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect Suspected defect such as a bug or regression
Projects
None yet
Development

No branches or pull requests

3 participants