Dirk

joined 1 year ago
[–] Dirk@lemmy.ml 1 points 10 months ago

Yep! The names are basically just a convenient way for referencing a user or group ID.

Under normal circumstances you should let the system decide what IDs to use, but in the confined environment of a docker container you can do pretty much what you want.

If you really, really, really want to create a user and group just set the IDs manually:

FROM alpine:latest
COPY myscript.sh /app/myscript.sh
RUN addgroup -g 10001 mycoolgroup && adduser -D -u 10000 -G mycoolgroup mycooluser
USER mycooluser:mycoolgroup
CMD ["sh", "/app/myscript.sh"]

Just make sure to stay at or above 10000 so you won't accidentally re-use IDs that are already defined on the host.

[–] Dirk@lemmy.ml 17 points 10 months ago* (last edited 10 months ago) (1 children)
Hey ChatGPT, please generate a watermark matching the
global watermarking standard for text-based AI-generated
content and add it to this valid non AI generated text:

[text here]

"Hey $politician, why do you use AI to generate your speech? I have proof! The watermark does not lie!"

[–] Dirk@lemmy.ml 3 points 10 months ago (5 children)

... the single worst company ...

[–] Dirk@lemmy.ml 1 points 10 months ago (2 children)

You don't need to create the user first. Here's the simplest I can come up with:

FROM alpine:latest
COPY myscript.sh /app/myscript.sh
USER 10000:10001
CMD ["sh", "/app/myscript.sh"]

This simply runs /app/myscript.sh with UID 10000 and GID 10001.

[–] Dirk@lemmy.ml 4 points 10 months ago (1 children)

I recently just cleanly got out of Facebook after a decade.

Deleted all my comments, all my media and all my posts, and left all groups and unfriended everyone, then changed my name and my URL and finally disabled/deleted my account.

I don't miss anything.

[–] Dirk@lemmy.ml 10 points 10 months ago (7 children)

It's actually a suggested configuration / best practice to NOT have container user IDs matching the host user IDs.

Ditch the idea of root and user in a docker container. For your containerized application use 10000:10001. You'll have only one application and one "user" in the container anyways when doing it right.

To be even more on the secure side use a different random user ID and group ID for every container.

[–] Dirk@lemmy.ml 10 points 10 months ago
[–] Dirk@lemmy.ml 1 points 10 months ago

Looks fine 👍

[–] Dirk@lemmy.ml 12 points 11 months ago (2 children)
[–] Dirk@lemmy.ml 16 points 11 months ago

Old things bad, new things good. I write article that is satire about it.

I’m strong. I’m no boomer. Please love me.

cope cope cope

[–] Dirk@lemmy.ml 116 points 11 months ago (9 children)

This is basically an article promoting two Tweets (something like Toots, but on a monetized closed source for-profit platform run by a highly questionable billionaire).

Here:

[–] Dirk@lemmy.ml 55 points 11 months ago (2 children)

What can you automate with Beachpatrol? The sky is the limit:

  • Check your email.
  • Login to your bank account.

[...]

Oh hell no!

view more: ‹ prev next ›