atlassian / docker-chromium-xvfb

Docker image for running browser tests against headless Chromium
MIT License
398 stars 125 forks source link

General use for other application #38

Closed vianhanif closed 5 years ago

vianhanif commented 5 years ago

using the base image, should it be possible for other type of application? for example in my case, I'm using Golang and chromedp.

currently I'm trying this Dockerfile

FROM golang:1.11-alpine as builder
WORKDIR /app
COPY go.mod . 
COPY go.sum .

RUN apk add --no-cache ca-certificates git

# Get dependancies - will also be cached if we won't change mod/sum
RUN go mod download

COPY . .
RUN CGO_ENABLED=0 GOARCH=amd64 go install -installsuffix "static" ./cmd/worker/app/...

FROM markadams/chromium-xvfb
COPY --from=builder /go/bin /bin
ENTRYPOINT ["/bin/app"]