mirror of
https://github.com/juanfont/headscale.git
synced 2024-11-27 12:05:26 +00:00
Temporary fix integration tests with dedicated Dockerfile
This commit is contained in:
parent
f9c4d577e2
commit
100f7190f3
21
Dockerfile.tmp-integration
Normal file
21
Dockerfile.tmp-integration
Normal file
@ -0,0 +1,21 @@
|
||||
# Builder image
|
||||
FROM docker.io/golang:1.18.0-bullseye AS build
|
||||
ARG VERSION=dev
|
||||
ENV GOPATH /go
|
||||
WORKDIR /go/src/headscale
|
||||
|
||||
COPY go.mod go.sum /go/src/headscale/
|
||||
RUN go mod download
|
||||
|
||||
COPY . .
|
||||
RUN CGO_ENABLED=0 go build -o /go/bin/headscale -ldflags="-s -w -X github.com/juanfont/headscale/cmd/headscale/cli.Version=$VERSION" -a ./cmd/headscale
|
||||
RUN test -e /go/bin/headscale
|
||||
|
||||
# Production image
|
||||
FROM gcr.io/distroless/base-debian11
|
||||
|
||||
COPY --from=build /go/bin/headscale /bin/headscale
|
||||
ENV TZ UTC
|
||||
|
||||
EXPOSE 8080/tcp
|
||||
CMD ["headscale"]
|
@ -50,7 +50,7 @@ func (s *IntegrationCLITestSuite) SetupTest() {
|
||||
}
|
||||
|
||||
headscaleBuildOptions := &dockertest.BuildOptions{
|
||||
Dockerfile: "Dockerfile",
|
||||
Dockerfile: "Dockerfile.tmp-integration",
|
||||
ContextDir: ".",
|
||||
}
|
||||
|
||||
|
@ -104,7 +104,7 @@ func (s *IntegrationDERPTestSuite) SetupSuite() {
|
||||
}
|
||||
|
||||
headscaleBuildOptions := &dockertest.BuildOptions{
|
||||
Dockerfile: "Dockerfile",
|
||||
Dockerfile: "Dockerfile.tmp-integration",
|
||||
ContextDir: ".",
|
||||
}
|
||||
|
||||
|
@ -228,7 +228,7 @@ func (s *IntegrationTestSuite) SetupSuite() {
|
||||
}
|
||||
|
||||
headscaleBuildOptions := &dockertest.BuildOptions{
|
||||
Dockerfile: "Dockerfile",
|
||||
Dockerfile: "Dockerfile.tmp-integration",
|
||||
ContextDir: ".",
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user