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
Use Debian bullseye on CI/CD/Dockerfile #1005
Conversation
Also, some QoL changes on the `Dockerfile`: - Parametrize GRAALVM_VERSION to make it easier to update - Remove installing programs already included on base image - Remove `deps.edn` from `.dockerignore` since it is necessary to build
Also some modifications necessary to make it work: - Migrate from `circleci` images to `clojure` since they're out-of-date and also seem to be considered legacy: https://circleci.com/docs/2.0/circleci-images/#legacy-language-images - Remove unnecessary usage of `sudo`, since all commands runs as root - Sync packages with `Dockerfile`. This will make easier to test locally if everything will work (of course, it is not 100% guarantee)
@@ -12,7 +12,6 @@ test/ | |||
.gitmodules | |||
appveyor.yml | |||
CHANGES.md | |||
deps.edn |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know how this worked before, but this file is necessary to build using the Dockerfile
.
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
RUN apt update | ||
RUN apt install --no-install-recommends -yy curl unzip build-essential zlib1g-dev sudo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
curl
, unzip
are already included on clojure:openjdk-11-lein-2.9.6-bullseye
. sudo
is not used anywhere in the Dockerfile
(and also, all commands already run as root).
# This script sets up the latest available musl-tools using apt pinning from Debian bullseye (11). | ||
# The one available in stretch (Debian 9) is outdated and this ensures we get the latest improvements | ||
# This explictly installs musl from bullseye and keeps the others at a higher priority | ||
# TODO: remove after clojure image is updated to bullseye | ||
|
||
cat >> /etc/apt/sources.list <<eof | ||
deb http://ftp.us.debian.org/debian bullseye main non-free contrib | ||
deb http://non-us.debian.org/debian-non-us bullseye/non-us main contrib non-free | ||
eof | ||
|
||
cat >> /etc/apt/preferences <<eof | ||
Package: * | ||
Pin: release a=stable | ||
Pin-Priority: 700 | ||
Package: * | ||
Pin: release a=testing | ||
Pin-Priority: 650 | ||
Package: * | ||
pin: release a=bullseye | ||
pin-priority: 600 | ||
eof | ||
|
||
apt-get update -y && apt-get install musl-tools/bullseye -y |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not necessary to backport anymore since we are already using bullseye.
- run: | ||
name: Install lsof | ||
command: | | ||
sudo apt-get install lsof |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not used anywhere and not available on clojure:openjdk-11-lein-2.9.6-bullseye
by default.
Already included on the base image.
Huh... I thought that CircleCI built everything as root, but it seems it builds with a non-root user. So this approach will not work, sadly. |
@thiagokokada You can use |
It is not available on |
Actually, it does seem that the commands without |
6c750d9
to
5e2a615
Compare
b1bab9a
to
cb4ed7e
Compare
.circleci/config.yml
Outdated
@@ -7,7 +7,7 @@ jobs: | |||
jvm: | |||
docker: | |||
# specify the version you desire here | |||
- image: circleci/clojure:lein-2.9.1 | |||
- image: circleci/clojure:lein-2.9.6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jvm
needs PostgreSQL to run, so using the circleci/clojure:lein-2.9.6
that already includes it by default.
@borkdude Well, it is working now (sorry for all the runs on CircleCI). BTW, what I said above was wrong, the error was purely my fault. Not entirely happy with this PR, will wait some days to see if CircleCI releases their updated image with more tooling included. However if they do not, I will open the PR for review later. |
Thanks so far, I'll wait. |
9b53844
to
0ed3f61
Compare
0ed8639
to
7951a21
Compare
@thiagokokada Could you perhaps not use force push? I don't think it adds anything, but it makes following what's going on a lot harder for me. The Github UI shows "this isn't here anymore"-like things when I click on the notifications. |
7951a21
to
3cfad03
Compare
Sorry @borkdude, will avoid this from now on. |
This reverts commit 3cfad03.
I think for clean-ups is pretty much it, I will just wait to see if CircleCI will release a new version of their Clojure image. |
@borkdude It is ready now. |
@thiagokokada Beautiful, thank you! |
Fix issue #866.
Also, many QoL changes on
Dockerfile
/.cicleci/config.yml
.