Skip to content

Commit

Permalink
Docker fixes (#19)
Browse files Browse the repository at this point in the history
* Dockerfile: change to debian commands

* docker.yml: run on docker branch too

* Dockerfile: update apt-get packages for debian

* Dockerfile: linux-headers-amd64

* Dockefile: apt-get install -y

* Dockerfile: Fix order

* Dockerfile: Fix whitespace issue

* Dockerfile: add tag label

* Docker.yml: update metadata-action

* Dockerfile: add unit tests

* Dockerfile: cargo build debug target

* Dockerfile: install bc
  • Loading branch information
lskatz authored Nov 2, 2023
1 parent 5259250 commit 89f6f75
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name: Create and publish a Docker image

on:
push:
branches: [master, main]
branches: [master, main, docker]

env:
REGISTRY: ghcr.io
Expand All @@ -33,7 +33,7 @@ jobs:

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

Expand Down
16 changes: 10 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,27 @@ LABEL license="https://github.com/lskatz/fasten/LICENSE"
LABEL maintainer="Lee Katz"
LABEL maintainer.email="gzu2@cdc.gov"
LABEL maintainer2="John Phan"
LABEL tag="${SOFTWARE_VER}"

RUN apk update
RUN apk add --no-cache \
RUN apt-get update
RUN apt-get install -y \
ca-certificates \
build-base \
linux-headers \
linux-headers-amd64 \
git \
openssl-dev \
util-linux-dev \
bc \
libcurl4-openssl-dev \
libseccomp-dev

RUN mkdir -p /usr/src/app \
&& cd /usr/src/app \
&& git clone https://github.com/lskatz/fasten \
&& cd /usr/src/app/fasten \
&& git checkout v${SOFTWARE_VER}
RUN cd /usr/src/app/fasten && cargo build --release

RUN cd /usr/src/app/fasten \
&& cargo build \
&& (set -ex; for i in tests/fasten*.sh; do bash $i; done;)

# build final container

Expand Down

0 comments on commit 89f6f75

Please sign in to comment.