Comments (8)
yes, the users files must be inside the Traefik container.
from whoami.
Hello,
the whoami container is based on a FROM SCRATCH
image, so there is no shell.
from whoami.
thx for the quick question but could you explain in more detail.
I'm a bit lost with the whoami image.
According to whoami's dockerfile is build FROM SCRATCH using golang:1-Alpine what is the latest stable images according to golang simple tags.
On top of this to go modules are installed go.mod
and go.sum
, that's it.
In Image Variants, it is said that is on the popular Alpine Linux project, available in the alpine official image.
Everywhere is said that Alpine
comes with /bash/sh
:
- containous/traefik-library-image#28
- https://stackoverflow.com/questions/40944479/how-to-use-bash-with-an-alpine-based-docker-image
- http://containertutorials.com/alpine/get_started.html
...
Is another alpine image necessary to have the shell included and only the very base image, that only includes the file system without any binaries? That is how I understand Creating a Docker Image from Scratch – Linux Hint (plus Create a base image | Docker Documentation).
This assumption is challenged by
"Cmd": [
"/bin/sh",
"-c",
"#(nop) ",
"EXPOSE 80"
],
in the whoami image.
I reckon the explanation is given in:
- bash - Starting container process caused "exec: "/bin/sh": stat /bin/sh: no such file or directory": unknown - Stack Overflow
- bash - Starting container process caused "exec: "/bin/sh": stat /bin/sh: no such file or directory": unknown - Stack Overflow
- docker - Error: Cannot Start Container: stat /bin/sh: no such file or directory" - Stack Overflow
but I don't fully get it. Besides this, they also mentioned there, that Alpine comes with /bin/sh
.
Moreover, I don't find anything that would indicate that Cmd
in the image gets overridden as mentioned in linux - Starting a shell in the Docker Alpine container - Stack Overflow.
Last but not least, I'm still sure that I could start a shell
once in the whoami
container but I cannot remember how and this is driving me nuts.
May I don't see the woods for the tree but some help is welcome.
BACKGROUND
I want to mount BasicAuth - Traefik usersFile
in the container but I get occasionally the error message that the file cannot be found.
Without a shell
, I can hardly troubleshoot.
from whoami.
- The whoami Dockerfile is a multistage build file:
- stage 1: build the binary
- stage 2: build the image
https://github.com/containous/whoami/blob/9bf5b44f24ad03c76e9f7b632736795f5314902a/Dockerfile#L19
-
The whoami image is not related to the traefik image
-
The file used by the basic auth must be in the Traefik container.
from whoami.
1. The whoami image is not related to the traefik image
that is clear
2\. The file used by the basic auth must be in the Traefik container.
but I want to add BasicAuth
to whoami
what works when I do
- traefik.http.middlewares.whoami_auth.basicauth.users=user:$$2y$$15$$GP95en
what may made traefik/traefik#4791 (comment) even worse.
from whoami.
usersFile
and users
are not the same thing:
usersFile
reference a file in the Traefik containerusers
is just a string.
from whoami.
usersFile
reference a file in the Traefik container
I assumed it references to a file in the labelled container.
So if I would like to use unique usersFile
per container managed by Traefik, each file has to be mounted into the Traefik container, hasn't it?
from whoami.
the docs may be improved to make this clearer 😃
from whoami.
Related Issues (20)
- [Suggestion] Add container ID HOT 6
- ERROR: no matching manifest for linux/arm/v7 in the manifest list entries HOT 2
- Why is there no "RemoteAddr" field in the "/api" interface? HOT 1
- Publish to ghcr.io as well as dockerhub HOT 2
- Cleanup the containous/whoami vs traefik/whoami HOT 3
- Add verbosity level HOT 1
- Add revDNS to access log HOT 1
- Add X-Forwarded-For to access log HOT 3
- Can not reproduce Traefik quick start. Getting http 503 error HOT 1
- Create a release and Docker Hub image for optional env query parameter HOT 1
- Default port is 8080 HOT 1
- Exposing httpOnly cookies and backend security headers HOT 3
- Support for HTTP/2.0 (h2c)?
- Support to display HTTP header before upgrading to websocket
- ---
- Print request headers HOT 2
- Base path setting HOT 1
- whoami stops after 10 minutes HOT 2
- not rootless HOT 2
- Pin golang version in Dockerfile HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from whoami.