Merge branch 'feature/docker' into develop
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
This commit is contained in:
commit
528b3c1da8
4
.dockerignore
Normal file
4
.dockerignore
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
/capture
|
||||||
|
/.woodpecker.yml
|
||||||
|
/.git
|
||||||
|
/.gitignore
|
|
@ -15,7 +15,7 @@ pipeline:
|
||||||
commands:
|
commands:
|
||||||
- go build -o /artifacts/capture
|
- go build -o /artifacts/capture
|
||||||
|
|
||||||
push-release:
|
push_release:
|
||||||
image: plugins/gitea-release
|
image: plugins/gitea-release
|
||||||
volumes: *volumes
|
volumes: *volumes
|
||||||
settings:
|
settings:
|
||||||
|
@ -26,3 +26,17 @@ pipeline:
|
||||||
files: /artifacts/capture
|
files: /artifacts/capture
|
||||||
when:
|
when:
|
||||||
event: [tag]
|
event: [tag]
|
||||||
|
|
||||||
|
docker_build_push:
|
||||||
|
image: docker:dind
|
||||||
|
secrets:
|
||||||
|
- registry_user
|
||||||
|
- registry_password
|
||||||
|
commands:
|
||||||
|
- echo "$REGISTRY_PASSWORD" | docker login -u "$REGISTRY_USER" --password-stdin
|
||||||
|
- "docker build -t deblan/capture:${CI_PIPELINE_DEPLOY_TARGET} ."
|
||||||
|
- "docker push deblan/capture:${CI_PIPELINE_DEPLOY_TARGET}"
|
||||||
|
volumes:
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
|
when:
|
||||||
|
event: [deployment]
|
||||||
|
|
11
Dockerfile
11
Dockerfile
|
@ -1,9 +1,12 @@
|
||||||
|
FROM golang:1.19 as builder
|
||||||
|
|
||||||
|
WORKDIR /src
|
||||||
|
COPY . .
|
||||||
|
RUN go build
|
||||||
|
|
||||||
FROM debian:stable-slim
|
FROM debian:stable-slim
|
||||||
|
|
||||||
RUN apt-get update && apt-get install ca-certificates -y
|
RUN apt-get update && apt-get install ca-certificates -y
|
||||||
|
COPY --from=builder /src/capture /usr/bin/capture
|
||||||
COPY ./capture /usr/bin/capture
|
|
||||||
|
|
||||||
WORKDIR /app
|
|
||||||
|
|
||||||
ENTRYPOINT ["/usr/bin/capture"]
|
ENTRYPOINT ["/usr/bin/capture"]
|
||||||
|
|
|
@ -11,6 +11,12 @@ Forked from [ofabricio/capture](https://github.com/ofabricio/capture).
|
||||||
./capture -url=https://example.com/ -port 9000 -dashboard 9001 -captures 16
|
./capture -url=https://example.com/ -port 9000 -dashboard 9001 -captures 16
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Via docker:
|
||||||
|
|
||||||
|
```
|
||||||
|
docker run -p 9000:9000 -p 9001:9001 deblan/capture -url=https://example.com/ -port 9000 -dashboard 9001 -captures 16
|
||||||
|
```
|
||||||
|
|
||||||
#### Settings
|
#### Settings
|
||||||
|
|
||||||
| param | description |
|
| param | description |
|
||||||
|
|
Loading…
Reference in a new issue