-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
12fd857
commit 7b2862f
Showing
4 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
output | ||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
FROM gitpod/workspace-full | ||
|
||
# Importante para executar o coletor localmente. | ||
|
||
# Adding trusting keys to apt for repositories | ||
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - | ||
# Adding Google Chrome to the repositories | ||
RUN sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list' | ||
# Updating apt to see and install Google Chrome | ||
RUN sudo apt-get -y update | ||
RUN sudo apt-get install -y google-chrome-stable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
image: | ||
file: .gitpod.Dockerfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
FROM golang:1.17.0-alpine AS builder | ||
|
||
ARG GIT_COMMIT=unspecified | ||
|
||
# Set necessary environmet variables needed for our image | ||
ENV GO111MODULE=on \ | ||
CGO_ENABLED=0 \ | ||
GOOS=linux \ | ||
GOARCH=amd64 | ||
|
||
# Move to working directory /build | ||
WORKDIR /build | ||
|
||
# Copy and download dependency using go mod | ||
COPY go.mod . | ||
COPY go.sum . | ||
RUN go mod download | ||
|
||
# Copy the code into the container | ||
COPY . . | ||
|
||
# Build the application | ||
RUN go build -o main | ||
|
||
# Move to /dist directory as the place for resulting binary folder | ||
WORKDIR /dist | ||
|
||
# Copy binary from build to main folder | ||
RUN cp /build/main . | ||
|
||
FROM chromedp/headless-shell:latest | ||
|
||
COPY --from=builder /dist/ / | ||
|
||
# Command to run | ||
ENTRYPOINT ["/main"] |