fix docker
This commit is contained in:
parent
2b8ba6e1aa
commit
33cf2dcac7
6 changed files with 16 additions and 10 deletions
|
|
@ -8,3 +8,4 @@ go.work
|
||||||
go.work.sum
|
go.work.sum
|
||||||
.idea
|
.idea
|
||||||
!framework/assets/dist
|
!framework/assets/dist
|
||||||
|
__htmgo
|
||||||
|
|
@ -10,12 +10,13 @@ COPY go.mod go.sum ./
|
||||||
# Download and cache the Go modules
|
# Download and cache the Go modules
|
||||||
RUN go mod download
|
RUN go mod download
|
||||||
|
|
||||||
# Always download the latest version of the framework
|
|
||||||
RUN go get github.com/maddalax/htmgo/framework@latest
|
|
||||||
|
|
||||||
# Copy the source code into the container
|
# Copy the source code into the container
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
|
# Always download the latest version of the framework
|
||||||
|
RUN go get github.com/maddalax/htmgo/framework@latest
|
||||||
|
RUN go mod tidy
|
||||||
|
|
||||||
# Build the Go binary for Linux
|
# Build the Go binary for Linux
|
||||||
RUN CGO_ENABLED=0 GOPRIVATE=github.com/maddalax LOG_LEVEL=debug go run github.com/maddalax/htmgo/cli/htmgo@latest build
|
RUN CGO_ENABLED=0 GOPRIVATE=github.com/maddalax LOG_LEVEL=debug go run github.com/maddalax/htmgo/cli/htmgo@latest build
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,3 +8,4 @@ go.work
|
||||||
go.work.sum
|
go.work.sum
|
||||||
.idea
|
.idea
|
||||||
!framework/assets/dist
|
!framework/assets/dist
|
||||||
|
__htmgo
|
||||||
|
|
@ -14,14 +14,15 @@ COPY go.mod go.sum ./
|
||||||
# Download and cache the Go modules
|
# Download and cache the Go modules
|
||||||
RUN go mod download
|
RUN go mod download
|
||||||
|
|
||||||
# Always download the latest version of the framework
|
|
||||||
RUN go get github.com/maddalax/htmgo/framework@latest
|
|
||||||
|
|
||||||
# Copy the source code into the container
|
# Copy the source code into the container
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
|
# Always download the latest version of the framework
|
||||||
|
RUN go get github.com/maddalax/htmgo/framework@latest
|
||||||
|
RUN go mod tidy
|
||||||
|
|
||||||
# Build the Go binary for Linux
|
# Build the Go binary for Linux
|
||||||
RUN GOPRIVATE=github.com/maddalax go run github.com/maddalax/htmgo/cli/htmgo@latest build
|
RUN LOG_LEVEL=debug GOPRIVATE=github.com/maddalax GOPROXY=direct go run github.com/maddalax/htmgo/cli/htmgo@latest build
|
||||||
|
|
||||||
|
|
||||||
# Stage 2: Create the smallest possible image
|
# Stage 2: Create the smallest possible image
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ go 1.23.0
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/labstack/echo/v4 v4.12.0
|
github.com/labstack/echo/v4 v4.12.0
|
||||||
github.com/maddalax/htmgo/framework v0.0.0-20240923170417-9e23e7cf2bea
|
github.com/maddalax/htmgo/framework v0.0.0-20240924173916-2b8ba6e1aa58
|
||||||
github.com/mattn/go-sqlite3 v1.14.16
|
github.com/mattn/go-sqlite3 v1.14.16
|
||||||
github.com/yuin/goldmark v1.7.4
|
github.com/yuin/goldmark v1.7.4
|
||||||
github.com/yuin/goldmark-highlighting/v2 v2.0.0-20230729083705-37449abec8cc
|
github.com/yuin/goldmark-highlighting/v2 v2.0.0-20230729083705-37449abec8cc
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,8 @@ github.com/labstack/gommon v0.4.2 h1:F8qTUNXgG1+6WQmqoUWnz8WiEU60mXVVw0P4ht1WRA0
|
||||||
github.com/labstack/gommon v0.4.2/go.mod h1:QlUFxVM+SNXhDL/Z7YhocGIBYOiwB0mXm1+1bAPHPyU=
|
github.com/labstack/gommon v0.4.2/go.mod h1:QlUFxVM+SNXhDL/Z7YhocGIBYOiwB0mXm1+1bAPHPyU=
|
||||||
github.com/maddalax/htmgo/framework v0.0.0-20240923170417-9e23e7cf2bea h1:TcZtFXyrJ86nPK6YBeOtkzjYbFMxiPNDJzvmaKRfB/c=
|
github.com/maddalax/htmgo/framework v0.0.0-20240923170417-9e23e7cf2bea h1:TcZtFXyrJ86nPK6YBeOtkzjYbFMxiPNDJzvmaKRfB/c=
|
||||||
github.com/maddalax/htmgo/framework v0.0.0-20240923170417-9e23e7cf2bea/go.mod h1:TA7KCaKhurpXceQrzClJOHqRsUSd5NL64ZngSg+I3oc=
|
github.com/maddalax/htmgo/framework v0.0.0-20240923170417-9e23e7cf2bea/go.mod h1:TA7KCaKhurpXceQrzClJOHqRsUSd5NL64ZngSg+I3oc=
|
||||||
|
github.com/maddalax/htmgo/framework v0.0.0-20240924173916-2b8ba6e1aa58 h1:xvBCxG0r2XJHPIb5q994lbZJVPxIOxCRsxoFj5mtlO4=
|
||||||
|
github.com/maddalax/htmgo/framework v0.0.0-20240924173916-2b8ba6e1aa58/go.mod h1:TA7KCaKhurpXceQrzClJOHqRsUSd5NL64ZngSg+I3oc=
|
||||||
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
|
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
|
||||||
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
|
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
|
||||||
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
|
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue