mirror of
https://github.com/antonmedv/fx.git
synced 2024-10-03 21:27:12 +03:00
Add docker
This commit is contained in:
parent
a079be1eea
commit
14e1bd8f5f
27
.github/workflows/docker.yml
vendored
Normal file
27
.github/workflows/docker.yml
vendored
Normal file
@ -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
|
23
Dockerfile
Normal file
23
Dockerfile
Normal file
@ -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
Block a user