mirror of https://github.com/antonmedv/fx
Add docker
parent
a079be1eea
commit
14e1bd8f5f
@ -0,0 +1,27 @@
|
|||||||
|
name: docker
|
||||||
|
|
||||||
|
on: [workflow_dispatch]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
docker:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Login to Docker Hub
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
username: antonmedv
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Build and push
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: ./Dockerfile
|
||||||
|
push: true
|
||||||
|
tags: antonmedv/fx:latest
|
@ -0,0 +1,23 @@
|
|||||||
|
FROM golang:latest as builder
|
||||||
|
|
||||||
|
WORKDIR /go
|
||||||
|
|
||||||
|
COPY go.mod go.sum ./
|
||||||
|
|
||||||
|
RUN go mod download
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
RUN go build -o fx .
|
||||||
|
|
||||||
|
FROM alpine
|
||||||
|
|
||||||
|
RUN apk add --update nodejs
|
||||||
|
|
||||||
|
COPY --from=builder /go/fx /bin/fx
|
||||||
|
|
||||||
|
WORKDIR /data
|
||||||
|
|
||||||
|
ENV COLORTERM=truecolor
|
||||||
|
|
||||||
|
ENTRYPOINT ["/bin/fx"]
|
Loading…
Reference in New Issue