mirror of
https://github.com/juanfont/headscale.git
synced 2025-08-17 15:47:30 +00:00
Compare commits
2 Commits
revert-141
...
tmp-fix-in
Author | SHA1 | Date | |
---|---|---|---|
![]() |
5539ef1f8f | ||
![]() |
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{
|
headscaleBuildOptions := &dockertest.BuildOptions{
|
||||||
Dockerfile: "Dockerfile",
|
Dockerfile: "Dockerfile.tmp-integration",
|
||||||
ContextDir: ".",
|
ContextDir: ".",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -104,7 +104,7 @@ func (s *IntegrationDERPTestSuite) SetupSuite() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
headscaleBuildOptions := &dockertest.BuildOptions{
|
headscaleBuildOptions := &dockertest.BuildOptions{
|
||||||
Dockerfile: "Dockerfile",
|
Dockerfile: "Dockerfile.tmp-integration",
|
||||||
ContextDir: ".",
|
ContextDir: ".",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -53,7 +53,7 @@ func TestIntegrationTestSuite(t *testing.T) {
|
|||||||
|
|
||||||
s.namespaces = map[string]TestNamespace{
|
s.namespaces = map[string]TestNamespace{
|
||||||
"thisspace": {
|
"thisspace": {
|
||||||
count: 10,
|
count: 5,
|
||||||
tailscales: make(map[string]dockertest.Resource),
|
tailscales: make(map[string]dockertest.Resource),
|
||||||
},
|
},
|
||||||
"otherspace": {
|
"otherspace": {
|
||||||
@@ -228,7 +228,7 @@ func (s *IntegrationTestSuite) SetupSuite() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
headscaleBuildOptions := &dockertest.BuildOptions{
|
headscaleBuildOptions := &dockertest.BuildOptions{
|
||||||
Dockerfile: "Dockerfile",
|
Dockerfile: "Dockerfile.tmp-integration",
|
||||||
ContextDir: ".",
|
ContextDir: ".",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user