Skip to content

Commit

Permalink
possible fix docker
Browse files Browse the repository at this point in the history
  • Loading branch information
ugosan committed Nov 11, 2022
1 parent 68d0930 commit 04fce77
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 46 deletions.
33 changes: 0 additions & 33 deletions .github/workflows/docker-release.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,22 @@ jobs:
asset_name: logshark-windows-amd64-${{ github.ref_name }}.tar.gz
asset_content_type: application/gzip

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
with:
images: ugosan/logshark

- name: Build and push
uses: docker/[email protected]
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
17 changes: 5 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
FROM --platform=$BUILDPLATFORM golang:1.19 as builder
ENV TERM "xterm-256color"
ARG TARGETARCH

WORKDIR /build
COPY . /build
RUN GOOS=linux GOARCH=$TARGETARCH go build -buildmode exe -ldflags="-w -s" -o ./logshark ./cmd

FROM alpine:latest
WORKDIR /root
COPY --from=builder /build/logshark /usr/local/bin/logshark
ENTRYPOINT ["logshark"]
FROM progrium/busybox
RUN opkg-install bash

ENV TERM "xterm-256color"

ADD dist/linux-amd64/logshark /usr/local/bin/logshark

ENTRYPOINT ["logshark"]
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ services:

#note you should not use "docker-compose up" but instead "docker-compose run logshark sh" since docker-compose doesnt attach to containers with "up". e.g. docker-compose run -p 9200:9200 logshark -port 9200
logshark:
image: ugosan/logshark
image: ugosan/logshark:latest
tty: true
stdin_open: true

0 comments on commit 04fce77

Please sign in to comment.