mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-08-31 15:14:03 +03:00
Add task for building image
This commit is contained in:
@@ -33,6 +33,11 @@ run = [
|
|||||||
"rm ./dist/config.yaml"
|
"rm ./dist/config.yaml"
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[tasks.image]
|
||||||
|
description = "Build docker image"
|
||||||
|
sources = ["**/*.go", "go.mod", "go.sum", "Dockerfile"]
|
||||||
|
run = "docker buildx build --pull -t mtg ."
|
||||||
|
|
||||||
[tasks.docs]
|
[tasks.docs]
|
||||||
description = "Run doc server"
|
description = "Run doc server"
|
||||||
tools."go:golang.org/x/pkgsite/cmd/pkgsite" = "latest"
|
tools."go:golang.org/x/pkgsite/cmd/pkgsite" = "latest"
|
||||||
|
|||||||
+7
-4
@@ -1,21 +1,24 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# BUILD STAGE
|
# BUILD STAGE
|
||||||
|
|
||||||
FROM golang:1.19-alpine AS build
|
FROM alpine:3 AS build
|
||||||
|
|
||||||
|
ENV CGO_ENABLED=0
|
||||||
|
ENV GOOS=linux
|
||||||
|
|
||||||
RUN set -x \
|
RUN set -x \
|
||||||
&& apk --no-cache --update add \
|
&& apk --no-cache --update add \
|
||||||
bash \
|
bash \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
curl \
|
|
||||||
git \
|
git \
|
||||||
make
|
mise
|
||||||
|
|
||||||
COPY . /app
|
COPY . /app
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
RUN set -x \
|
RUN set -x \
|
||||||
&& make -j 4 static
|
&& mise trust \
|
||||||
|
&& mise tasks run static
|
||||||
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|||||||
Reference in New Issue
Block a user