From 04874d21e3af149bde2e4b818378d2bd7cfd2fbb Mon Sep 17 00:00:00 2001 From: Marcel Goerentz Date: Thu, 20 Jun 2024 23:37:22 +0200 Subject: [PATCH] Update Dockerfile --- .github/workflows/release.yml | 5 +++-- Dockerfile | 16 +++++++++------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c76e3c5..2a87cd2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,7 +10,6 @@ jobs: buildBinaries: name: Build and release binaries runs-on: ubuntu-latest - if: github.ref == 'refs/heads/master' steps: - name: Check out code into the Go module directory uses: actions/checkout@v4 @@ -38,8 +37,10 @@ jobs: buildDockerImages: name: Build and push Docker Images runs-on: ubuntu-latest - if: github.ref == 'refs/heads/master' steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 diff --git a/Dockerfile b/Dockerfile index ca24218..81586d3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,9 @@ # First stage. Building a binary # ----------------------------------------------------------------------------- -FROM golang:alpine AS builder +FROM golang:1.22 AS builder # Download the source code -RUN apk update && apk add git +RUN apt-get update && apt-get install -y git RUN git clone https://github.com/marcelGoerentz/Threadfin.git /src WORKDIR /src @@ -16,7 +16,7 @@ RUN go build threadfin.go # Second stage. Creating an image # ----------------------------------------------------------------------------- -FROM alpine:3.20 +FROM ubuntu:22.04 ARG BUILD_DATE ARG VCS_REF @@ -53,14 +53,16 @@ ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$THREADFIN # Set working directory WORKDIR $THREADFIN_HOME -RUN apk update && apk upgrade -RUN apk add ca-certificates\ +RUN rm /var/lib/dpkg/info/libc-bin.* +RUN apt-get clean +RUN apt-get install libc-bin +RUN apt-get update && apt-get upgrade +RUN apt-get install -y ca-certificates\ curl\ ffmpeg\ vlc -#RUN DEBIAN_FRONTEND=noninteractive TZ="America/New_York" apt-get -y install tzdata -RUN DEBIAN_FRONTEND=noninteractive TZ="America/New_York" apk add tzdata +RUN DEBIAN_FRONTEND=noninteractive TZ="America/New_York" apt-get -y install tzdata RUN mkdir -p $THREADFIN_BIN