mirror of https://github.com/dirtbags/moth.git
Fix docker build?
This commit is contained in:
parent
462cacad5a
commit
e820812278
|
@ -1,12 +0,0 @@
|
|||
name: moth-devel Docker build
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
build-devel:
|
||||
name: Build moth-devel
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Retrieve code
|
||||
uses: actions/checkout@v1
|
||||
- name: Build mothd
|
||||
run: docker build -f Dockerfile.moth-devel .
|
|
@ -9,4 +9,4 @@ jobs:
|
|||
- name: Retrieve code
|
||||
uses: actions/checkout@v1
|
||||
- name: Build mothd
|
||||
run: docker build -f Dockerfile.moth .
|
||||
run: docker build .
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
FROM golang:1.13 AS builder
|
||||
COPY go.* /src/
|
||||
COPY pkg /src/pkg/
|
||||
COPY cmd /src/cmd/
|
||||
WORKDIR /src/
|
||||
#RUN go test ./...
|
||||
RUN CGO_ENABLED=0 GOOS=linux go install -i -a -ldflags '-extldflags "-static"' ./...
|
||||
|
||||
FROM scratch
|
||||
COPY --from=builder /go/bin/* /usr/bin/
|
||||
COPY theme /theme/
|
||||
COPY example-puzzles /puzzles/
|
||||
COPY LICENSE.md /LICENSE.md
|
||||
|
||||
ENTRYPOINT [ "/usr/bin/mothd" ]
|
|
@ -1,12 +0,0 @@
|
|||
FROM golang:1.12.0-alpine AS builder
|
||||
COPY src /go/src/github.com/dirtbags/moth/src
|
||||
WORKDIR /go/src/github.com/dirtbags/moth/src
|
||||
RUN go get .
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static"' -o /mothd *.go
|
||||
|
||||
FROM scratch
|
||||
COPY --from=builder /mothd /mothd
|
||||
COPY theme /theme
|
||||
COPY LICENSE.md /LICENSE
|
||||
|
||||
ENTRYPOINT [ "/mothd" ]
|
Loading…
Reference in New Issue