This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-11-03
Channels
- # announcements (55)
- # babashka (14)
- # beginners (49)
- # biff (9)
- # calva (73)
- # cider (14)
- # clerk (8)
- # clj-kondo (6)
- # clojure (92)
- # clojure-dev (4)
- # clojure-europe (18)
- # clojure-norway (62)
- # clojure-uk (5)
- # clojuredesign-podcast (4)
- # clojurescript (34)
- # cursive (40)
- # data-science (4)
- # datomic (5)
- # dev-tooling (1)
- # eastwood (6)
- # emacs (107)
- # figwheel-main (9)
- # fulcro (13)
- # gratitude (9)
- # hyperfiddle (5)
- # introduce-yourself (2)
- # off-topic (45)
- # overtone (23)
- # portal (5)
- # releases (3)
- # shadow-cljs (6)
- # specter (1)
- # squint (32)
- # timbre (4)
- # vscode (2)
Hi! My question is a bit out of topic for any channel, I think, but may I ask in case one of you would see an obvious answer? Does anyone have an inkling as to why the file on the left becomes messed up (space and newline literals) after Docker copy? Conclusion: it wasn’t the docker copy the issue, but the fact that the copy didn’t overwrite a previous messed up version of the file, because it was part of a mounted volume.
I must have been searching for like 30 minutes and still no idea. File encodings are equivalent.
text/plain; charset=us-ascii
What feels the most weird to me in this, is how even leading spaces are added
Mac host, docker image built by GitHub’s Codespace environment
Yeah, the file is valid utf-8. I tell VS Code to save it as utf-8 and the resulting encoding reported remains the us-ascii subset of utf-8, because the file doesn’t dip in anything more than the subset.
Ok, I think I got it.
The wrong copy must be the output of what I had before the file COPY operation in this dockerfile, but since it’s part of a docker volume, it doesn’t get refreshed by the docker build…
"type=volume,source=home-xdg-config,target=/home/codespace/.config",
I suppose I can be bit in many ways doing things this way.
It was to preserve config changes across dev container rebuilds, if I remember well. But in the past years, nobody ever changed any config, and if they did without contributing to the docker bootstrap, it wouldn’t be ever shared with the team, so I should try removing that.
We used babashka in the https://github.com/docker/genai-stack to replace some shell scripting (in the Dockerfile here https://github.com/docker/genai-stack/blob/main/pull_model.Dockerfile - this automates a model pull using Ollama). I’ve had a few people reach to express appreciation for the reminder that babashka works nicely for this kind of thing. So I thought I’d pass that on to you here.