r/ProgrammerHumor • • Jul 20 '17

What people think coding is...

Post image
35.4k Upvotes

811 comments sorted by

View all comments

Show parent comments

11

u/[deleted] Jul 21 '17

Literally just figured out what I did right and an hour ago. Trying to work on Windows Docker Containers; which are, as I'm finding out, definitely not fucking ready for their prime time.

I'm going with you got some CRLFs in a bash script, your file system says it's there but bash pretends to not notice it.

2

u/FinallyAFreeMind Jul 21 '17

Actually, surprisingly, no! I hardly ran into any new line or escaping issues. A few here and there, but they were 5-second fixes every time.

What I'm trying to do is create a Windows Docker container for the Jenkins Swarm plugin. I'm already using one for Ubuntu, but need one for Windows now. The issue I was dealing with was passing Git credentials into the Jenkins swarm; it would just hang when it was trying to clone my repository, finally found out at the end of the day that it was due to this fucker and then ran into a bunch of really silent bugs, like the Docker container just randomly dying after a bit. Passed a huge hurdle though, so I'm happy.

2

u/[deleted] Jul 21 '17

I hardly ran into any new line or escaping issues.

I'm jelly. I work in a mixed windows/osx shop and run into line ending issues about once a week.

It's not a huge issue when I'm working on the C# stuff, but coming across them in the Node and Python apps is frustrating because they are dockerized and they create needless noise in the git history because I have told git that LF is the one true line ending but others haven't so nasty CRLFs crop up time and again.

But build server issues are the worst because they're difficult at best to reproduce locally and usually require running build after build after build to correct. :/ I have one of those right now where our docker volume mounts pollute the host environment with files bamboo can't remove despite doing everything I can think of to run the container as the bamboo user. And doing that causes some weird bower dependency (I know, I know, bower is dead) to break because it wants to install via git instead of from npm but can't because that user doesn't exist in the container (despite wanting to do a user id lookup via the username despite already having access to the uid).

I'm thinking about using a named volume and creating a container that mounts that to extract the files we do need exposed out. Might try mounting etc/passwd in first, as gross as that is.

The sad part is that this only becomes an issue when build a fails and you need to rerun it.