danielgtaylor / danielgtaylor/apisprout
APISprout in Container can't download from untrusted SSL Web server
- Dominant language
- Go
- Stars
- 719
- Forks
- 70
- PR merge metrics
- No merged PRs in 30d
Description
APISprout in Docker Image can't download an OpenAPI file from a SSL Web server that is signed with a private authority.
```
$ ./apisprout https://localhost:8080/api.yml
2020/02/05 23:08:28 Get https://localhost:8080/api.yml: x509: certificate signed by unknown authority
```
However `update-ca-certificates` is present into the image (see Dockerfile).
I suggest you to modify the Dockerfile to run `update-ca-certificates` at APISprout startup by replacing
```
ENTRYPOINT ["/usr/local/bin/apisprout"]
```
with
```
COPY startup.sh /startup.sh
RUN chmod +x /startup.sh
ENTRYPOINT [ "/startup.sh" ]
```
and adding this new `startup.sh` file:
```
#!/bin/sh
update-ca-certificates
/startup.sh
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the repository's Dockerfile and inspect how the container currently launches /usr/local/bin/apisprout. Review the proposed startup.sh flow, then build the image and test downloading the shown OpenAPI URL from a server using a private certificate authority; done means that request succeeds in the container.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go
- Domain
- devops, infrastructure
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100