You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to follow docker container logs with "docker logs container -f" the progress bar is not showing even though by default it's following StdOut and the progress bar is writing to os.Stdout
main.go
package main
import (
"time"
"github.com/schollz/progressbar/v3"
)
func main() {
bar := progressbar.Default(100)
for i := 0; i < 100; i++ {
bar.Add(1)
time.Sleep(1 * time.Second)
}
}
Dockerfile
FROM golang:1.18-alpine
WORKDIR /app
COPY go.mod ./
COPY go.sum ./
RUN go mod download
COPY *.go ./
RUN go build -o /application
CMD [ "/application" ]
Building:
docker build -t app .
Running:
docker run -d -t app
Follow logs:
docker logs 0b26e53d7321 -f
The text was updated successfully, but these errors were encountered:
When trying to follow docker container logs with "docker logs container -f" the progress bar is not showing even though by default it's following StdOut and the progress bar is writing to os.Stdout
main.go
Dockerfile
Building:
docker build -t app .
Running:
docker run -d -t app
Follow logs:
docker logs 0b26e53d7321 -f
The text was updated successfully, but these errors were encountered: