Comments (8)
It seems that the upstream project is providing its own assemble script, which means that this is not an issue related to this repository as the upstream project never supported building with the stock assemble script.
Anyway I will check it out of my curiosity as the project seems simple enough.
from golang-container.
It seems that the upstream project is providing its own assemble script, which means that this is not an issue related to this repository as the upstream project never supported building with the stock assemble script.
I am the maintainer of https://github.com/jarifibrahim/golang-health-check :)
I had to add the custom s2i scripts because the default ones didn't work for us. You can try the without-s2i
branch, it doesn't have the custom assemble and run script.
from golang-container.
@jarifibrahim I don't know that ;) You have pointed me to your fork.
Digging bit deeper it seems that you are not setting the IMPORT_URL
env var as described in the usage printed. With it set properly it builds fine -e IMPORT_URL='github.com/jarifibrahim/golang-health-check'
. When it is not set we can't really infer what is built.
The assembler script should error out with better error messages and better handled edge cases. I will try to look in to that today for this upstream repo(can't promise that it will ever make its way in to the centos).
from golang-container.
@jcajka but why do I need to set the IMPORT_URL
. Shouldn't the builder image for simple apps work without any kind of customizations?
For instance, the node builder image works with
s2i build . nodeshift/centos7-s2i-nodejs:10.x node-health-check
out of the box.
In our usecase, setting an environment variable isn't feasible (long story).
Can we make some changes to the assembler script so that it works for simple apps without IMPORT/INSTALL
environment variables?
I would love to help in fixing the scripts 😉
from golang-container.
@jarifibrahim Issue for the golang(notably it is compiled in contrast to the node and hasn't had build in package manager) in many cases is that you need to know what are you building therefor the import_url. In most cases(I need to investigate go mods&co if it is possible to infer the import url from the metadata in the repo) it can't be inferred and by design the s2i is not exposing the URI with sources built, witch would help a lot with the inference. Current assemble script supports only simple projects with fully resolved dependencies without the import_url set.
from golang-container.
Oh anf GOPATH that needs to be prepared is/was core part of the build.
from golang-container.
Current assemble script supports only simple projects with fully resolved dependencies without the import_url set.
Ah, okay.
from golang-container.
I have submitted/will submit two PRs one that improves the error message and other adding capability to extract the needed meta data from the Go module, tl;dr; go mod init <IMPORT_URL>
in the root of the Go project.
I will close this issue and let's talk more off github.
from golang-container.
Related Issues (17)
- Build fails if no .go files located at root HOT 3
- Docker hub has only Go 1.10 image HOT 3
- Use better assemble script HOT 8
- Build fails for golang-starters/golang-rest-http HOT 3
- Support for tags for each minor version of go HOT 4
- Golang version tags in image HOT 3
- Error while starting container HOT 1
- Add golang 1.16 image
- Hardcoded point releases in imagestreams.json
- Add golang 1.18 image HOT 1
- Testing issue created for samples operator HOT 1
- Support for non-standard go build path HOT 1
- container does not start properly in OpenShift HOT 11
- No Action Required !! Testing automation workflow HOT 1
- go-toolset-7-golang updated to 1.10
- Support vendor dir in IMPORT_URL location
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from golang-container.