Comments (2)
Current recommended approach is to install psql
on each run with a manual command
- run: sudo apt install -y postgresql-client || true
or with a 3rd party orb.
Side note
The suggested command should be updated to
- run: sudo apt-get update && sudo apt install -y postgresql-client
Otherwise
a) it fails with the "E: Unable to locate package postgresql-client" error
b) when it fails it does not stop the build
Both approaches (the manual one and with the orb) have the same drawbacks:
- they don't benefit from Docker's fs caching. That means more HTTP requests are made, and every request can potentially fail the build due to a network error
- they spend CircleCI credits (which is especially important for public repos with free credits)
The alternative (which is also mentioned in the docs) is to maintain and host your own Docker image with psql
preinstalled. Although it does not have the drawbacks from above, it requires a significant amount of effort from devs. I assume that was the main reason for #61 ("we want something that works").
I do understand that you can not satisfy every dev in the world, but perhaps the top X popular databases?
An alternative to put everything into one base image would be to have the "-pg", "-mysql" etc prefixes similar to existing "-node" (although I understand it will boost the number of image variations).
from cimg-base.
I'll let @felicianotech speak further/correct me on this, but initial reaction is that this is something better kept in either the config using apt get, or a custom Docker image. While I can see the upside of adding psql
to the base image, we would also include the other clients, which I'm unsure is something we'd want to do. Creating variants doesn't feel quite right either.
I would argue that maintaining a Docker image based on cimg/base
with specific dependencies is a much less brittle way of including them within your pipelines, since you'll have full control over the version of dependencies installed (say you rely on cimg/base:stable-pg
, and there's a breaking change to postgres for whatever reason and we upgrade). Curious what you mean by "significant amount of effort from devs" - unless upgrading or adding a dependency, a Docker image will be pretty low maintenance.
Keeping these images generic enough to fit most use cases while also having the flexibility to be moulded to specific needs is more or less an end goal of our convenience images, and adding SQL/NoSQL clients to the mix might shake that up a bit too much.
from cimg-base.
Related Issues (20)
- Where is SSH_CONFIG_DIR set? HOT 1
- The sample won't pass as cowsay is not in the system path HOT 1
- Checkout step of build fails after release on 19 May 2022 HOT 5
- Nana123
- Basic Checkout of build fails on 22.04, works on 20.04 HOT 7
- Ubuntu 22.04 becomes default starting with July edge and September current HOT 1
- libncurses5-dev in stable-20.4 5 days ago, now is not present HOT 1
- Install git-lfs
- Docker Compose 2.10.1 HOT 1
- Upgrade `yq` to `v4.26.1` for CVE fix HOT 1
- Update Dockerize
- Might need alternative git source HOT 1
- Can you create this image please? HOT 1
- Add Retry Command HOT 2
- Docker image 20.04 and 18.04 no more pushed on Docker Hub HOT 3
- Missing file package HOT 1
- BUG: linking errors with cimg/python:3.11.0 and glibc HOT 2
- Last Ubuntu 18.04 Release will be for March 2023
- Test issue
- Incorrect version of yq for arm
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 cimg-base.