Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add dockerfile #16

Merged
merged 1 commit into from
Oct 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .github/workflows/linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
# with:
# args: './*.md'

docker-lint:
docker-lint-matrix:
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -37,6 +37,15 @@ jobs:
ignore: DL3041,DL3008
dockerfile: Dockerfile.${{ matrix.package }}

docker-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: hadolint/hadolint-action@v2.1.0
with:
recursive: true
ignore: DL3041,DL3008

shellcheck:
runs-on: ubuntu-latest
steps:
Expand Down
18 changes: 18 additions & 0 deletions sztp-agent/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# syntax=docker/dockerfile:1

# Alpine is chosen for its small footprint
# compared to Ubuntu
FROM docker.io/library/golang:1.19.1-alpine

WORKDIR /app

# Download necessary Go modules
COPY go.mod ./
COPY go.sum ./
RUN go mod download

# build an app
COPY *.go ./
RUN go build -o /opi-sztp-agent

CMD [ "/opi-sztp-agent" ]
2 changes: 1 addition & 1 deletion sztp-agent/go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/opiproject/sztp/stpd-agent
module github.com/opiproject/sztp/sztp-agent

go 1.17

Expand Down