-
-
Notifications
You must be signed in to change notification settings - Fork 312
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
6045-docker-hub-official-image #6047
6045-docker-hub-official-image #6047
Conversation
The current code misses the Alpine image, waiting some approval to add it once the Ubuntu image is satisfying (maybe it should be marked as draft, but I am afraid drafts do not run Github Actions). @aminnairi care to give a hand to add the 1000:1000 user on this image? |
@@ -0,0 +1,16 @@ | |||
FROM ubuntu:22.04 |
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.
Hi @khalyomede I'm one of the people @Anton-4 mentioned in the PR who talked about Docker on zulip. For my experiments with a dedicated Roc docker image I tried Debian bullseye - it worked. I have two questions:
- if Ubuntu is built on Debian, would it make sense to go directly for Debian? Or maybe even Alpine to keep things small.
- would it make sense to use
@latest
tag? the benefit of this approach is that we'd get quick feedback. The tests would fail indicating that the new OS changes are incompatible with Roc
Keep in mind I'm a Sunday docker user, I might be wrong so post this feedback as questions.
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.
Hi Jakub,
As per my discussion in the related issue and my tests, using Roc on Alpine is not trivial and would probably require some research on what dynamic libraries are needed in order for Roc to work properly on Alpine.
And to address your second point, using the latest
tag would be problematic for reproducability since it is the sole point of Docker and most IAC solutions out there.
If you need to tests things out, you can use a combination of dynamic image name and a GitHub Action Matrix in order to test against multiple versions of Debian if you'd like.
ARG DEBIAN_VERSION=12.0.0 #hypothetic Debian version, must refer to the available tags
FROM debian:$DEBIAN_VERSION
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.
if Ubuntu is built on Debian, would it make sense to go directly for Debian? Or maybe even Alpine to keep things small.
I do not have a strong opinion on one or the other, what you say makes sense, maybe we can support Ubuntu for the first time, if we have some request we may create another tag without any issues (maintaining one or two will not make a big difference since the OSes are quite close to each other).
would it make sense to use @latest tag? the benefit of this approach is that we'd get quick feedback. The tests would fail indicating that the new OS changes are incompatible with Roc
We may create another tag and maintain both ubuntu-2204-nightly
and ubuntu-latest-nightly
for this purpose, I do not see any issues against this I'll work on it.
Thanks for the feedback @jakub-c
FYI my attempt at running Roc on Alpine failed. Below is a complete breakdown: I used the following Dockerfile: FROM alpine:3
RUN apk update
RUN apk add --no-cache \
wget \
musl-dev \
binutils \
clang \
gcompat
RUN wget -q -O roc.tar.gz https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-old_linux_x86_64-latest.tar.gz
RUN mkdir /usr/bin/roc
# --strip-components=1 not needed once https://github.com/roc-lang/roc/issues/4118 is solved.
RUN tar -xvz -f roc.tar.gz --directory /usr/bin/roc --strip-components=1
RUN addgroup -g 1000 -S roc
RUN adduser -g "" -h /home/roc -s /bin/sh -SDu 1000 roc And this dockerfile: version: "3"
services:
roc:
build: .
entrypoint: roc
working_dir: /home/roc/app
user: roc
volumes:
- ../../:/home/roc/app I stumbled upon the first issue: version: "3"
services:
roc:
build: .
tty: true
working_dir: /home/roc/app
user: roc
volumes:
- ../../:/home/roc/app And then $ ldd roc
/lib64/ld-linux-x86-64.so.2 (0x7f38a21ea000)
librt.so.1 => /lib64/ld-linux-x86-64.so.2 (0x7f38a21ea000)
libdl.so.2 => /lib64/ld-linux-x86-64.so.2 (0x7f38a21ea000)
libpthread.so.0 => /lib64/ld-linux-x86-64.so.2 (0x7f38a21ea000)
libm.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7f38a21ea000)
libz.so.1 => /lib/libz.so.1 (0x7f389ddbf000)
Error loading shared library libtinfo.so.6: No such file or directory (needed by roc)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x7f389db71000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x7f389db53000)
libc.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7f38a21ea000)
Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by roc)
Error relocating roc: mallinfo: symbol not found
Error relocating roc: del_curterm: symbol not found
Error relocating roc: setupterm: symbol not found
Error relocating roc: __memcpy_chk: symbol not found
Error relocating roc: set_curterm: symbol not found
Error relocating roc: __register_atfork: symbol not found
Error relocating roc: tigetnum: symbol not found
Error relocating roc: __snprintf_chk: symbol not found
Error relocating roc: gnu_get_libc_version: symbol not found
Error relocating roc: __res_init: symbol not found If it is okay for you guys, I think in this issue we will only support Ubuntu (the question still remains if you want to also support Debian, or only Debian). I have opened the issue ... to discuss furthermore. |
@khalyomede if nobody's explicitly asking for Alpine, than Ubuntu / Debian is probably the way to go. It always possible to shave few MBs later on, if there's a need for a smaller image. |
FYI the Docker image fails to run Roc properly on Debian 10 (Buster) because glibc seems to not be integrated, and after attempts to install libc6-dev it still does not work properly. We will just support Debian 12 (Bookworm), and since Debian 10 (Buster) was the latest LTS, we will not have other Debian versions to support other than 12 (when 13 comes out, if 12 is LTS, we will keep supporting 12). The issue have been encountered with the following Dockerfile: FROM debian:buster
RUN apt-get update --fix-missing
RUN apt-get upgrade --yes
RUN apt-get install --yes \
wget \
libc-dev \
binutils \
build-essential \
clang
RUN wget -q -O roc.tar.gz https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-linux_x86_64-latest.tar.gz
RUN mkdir /usr/lib/roc
# --strip-components=1 not needed once https://github.com/roc-lang/roc/issues/4118 is solved.
RUN tar -xvz -f roc.tar.gz --directory /usr/lib/roc --strip-components=1
ENV PATH="$PATH:/usr/lib/roc" $ docker-compose -f docker/debian-buster-nightly/docker-compose.yml run roc version
roc: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by roc)
roc: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by roc)
roc: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.29' not found (required by roc) |
I have changed the Docker image naming convention from:
To
Which makes more sense since the developer will mostly care about the roc version first when searching the tag on Docker Hub, and also to keep consistancy with what is already done on other language images on Docker Hub (like Node or PHP). |
I think using an old_linux release should fix this: https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-old_linux_x86_64-latest.tar.gz |
I also tried and had no luck trying with the old linux release as well unfortunately |
Hmm that's strange because it's built on debian buster :p |
My bad, I think I just shuffled my files around, it works indeed 🎊 will push the tag now thank you! |
…e/roc into 6045-docker-hub-official-image
No need to test the nightlies every PR, they only change once a day :p
Thank you very much @khalyomede! |
I'll try to set it up on dockerhub this week |
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.
Great thank you for this addition!
Can you merge this @rtfeldman? |
The images are now available on docker hub: https://hub.docker.com/repositories/roclang |
Looks like they are in a private repository or some kind of unknown issue with the repository link because I'm getting the Docker Login screen when trying to access it while other images are still available. |
The repository is public, only official docker repositories seem to be viewable without login. The process to make our repo official, is unfortunately quite involved. |
Issue
Added
nightly-ubuntu-2004
nightly-ubuntu-2204
nightly-ubuntu-latest
nightly-debian-buster
nightly-debian-bookworm
nightly-debian-latest
Fixed
None
Breaking
None
## Notes
The "tags" follow this naming convention:
Proposed policy: we maintain 2 latest LTS versions of an OS + the latest tag targets the last version for each OSes.