Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
iPerf
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Docker
iPerf
Commits
eb50299d
Verified
Commit
eb50299d
authored
7 months ago
by
Chris Coley
Browse files
Options
Downloads
Patches
Plain Diff
Refactor images for cleaner building and use
parent
cf6ec4b6
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+8
-5
8 additions, 5 deletions
.gitlab-ci.yml
Dockerfile
+9
-11
9 additions, 11 deletions
Dockerfile
with
17 additions
and
16 deletions
.gitlab-ci.yml
+
8
−
5
View file @
eb50299d
...
@@ -3,6 +3,7 @@ stages:
...
@@ -3,6 +3,7 @@ stages:
-
release
-
release
.build
:
.build
:
stage
:
build
stage
:
build
tags
:
[
docker
]
tags
:
[
docker
]
...
@@ -13,10 +14,12 @@ stages:
...
@@ -13,10 +14,12 @@ stages:
-
>-
-
>-
/kaniko/executor
/kaniko/executor
--cache=false
--cache=false
--target "${BUILD_TARGET}"
--skip-unused-stages
--target ${BUILD_TARGET}
--context "${CI_PROJECT_DIR}"
--context "${CI_PROJECT_DIR}"
--dockerfile "${CI_PROJECT_DIR}/Dockerfile"
--dockerfile "${CI_PROJECT_DIR}/Dockerfile"
--destination "${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHORT_SHA}-${BUILD_TARGET}"
--destination "${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHORT_SHA}-${BUILD_TARGET}"
--label org.opencontainers.image.authors="$LABEL_AUTHORS"
--label org.opencontainers.image.created="$(date -u -Iseconds)"
--label org.opencontainers.image.created="$(date -u -Iseconds)"
--label org.opencontainers.image.revision="$CI_COMMIT_SHA"
--label org.opencontainers.image.revision="$CI_COMMIT_SHA"
--label org.opencontainers.image.source="$CI_PROJECT_URL"
--label org.opencontainers.image.source="$CI_PROJECT_URL"
...
@@ -32,20 +35,22 @@ build:iperf3:
...
@@ -32,20 +35,22 @@ build:iperf3:
BUILD_TARGET
:
iperf3
BUILD_TARGET
:
iperf3
.release
:
.release
:
stage
:
release
stage
:
release
tags
:
[
docker
]
tags
:
[
docker
]
image
:
image
:
name
:
gcr.io/go-containerregistry/crane:debug
name
:
gcr.io/go-containerregistry/crane:debug
entrypoint
:
[
'
'
]
entrypoint
:
[
'
'
]
rules
:
-
if
:
$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
before_script
:
before_script
:
-
crane auth login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD
$CI_REGISTRY
-
crane auth login -u
"
$CI_REGISTRY_USER
"
-p
"
$CI_REGISTRY_PASSWORD
" "
$CI_REGISTRY
"
release:iperf2
:
release:iperf2
:
extends
:
.release
extends
:
.release
needs
:
[
'
build:iperf2'
]
needs
:
[
'
build:iperf2'
]
script
:
script
:
-
crane tag ${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHORT_SHA}-iperf2 2.2.0
-
crane tag ${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHORT_SHA}-iperf2
2.2
-
crane tag ${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHORT_SHA}-iperf2
2.2
-
crane tag ${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHORT_SHA}-iperf2
2
-
crane tag ${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHORT_SHA}-iperf2
2
...
@@ -53,9 +58,7 @@ release:iperf3:
...
@@ -53,9 +58,7 @@ release:iperf3:
extends
:
.release
extends
:
.release
needs
:
[
'
build:iperf3'
]
needs
:
[
'
build:iperf3'
]
script
:
script
:
-
crane tag ${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHORT_SHA}-iperf3 3.17.1
-
crane tag ${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHORT_SHA}-iperf3
3.17
-
crane tag ${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHORT_SHA}-iperf3
3.17
-
crane tag ${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHORT_SHA}-iperf3
3
-
crane tag ${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHORT_SHA}-iperf3
3
# vi: set ts=2 sw=2 et ft=yaml:
# vi: set ts=2 sw=2 et ft=yaml:
This diff is collapsed.
Click to expand it.
Dockerfile
+
9
−
11
View file @
eb50299d
FROM
alpine:3.21
AS
base
LABEL
org.opencontainers.image.authors="Chris Coley <chris@codingallnight.com>"
# iPerf 2 image
# iPerf 2 image
FROM
base
AS
iperf2
FROM
alpine:3.21
AS
iperf2
ENV
IPERF_VERSION="2.2.0-r0"
RUN
apk add
--no-cache
iperf
=
~2.2
RUN
apk add
--no-cache
iperf
=
${
IPERF_VERSION
}
ENTRYPOINT
["iperf"]
ENTRYPOINT
["iperf",
"-s"]
CMD
[
"-s"]
EXPOSE
5001/tcp 5001/udp
EXPOSE
5001/tcp 5001/udp
# iPerf 3 image
# iPerf 3 image
FROM
base
AS
iperf3
FROM
alpine:3.21
AS
iperf3
ENV
IPERF_VERSION="3.17.1-r0"
RUN
apk add
--no-cache
iperf3
=
~3.17
RUN
apk add
--no-cache
iperf3
=
${
IPERF_VERSION
}
ENTRYPOINT
["iperf3"]
ENTRYPOINT
["iperf3",
"-s"]
CMD
[
"-s"]
EXPOSE
5201/tcp 5201/udp
EXPOSE
5201/tcp 5201/udp
# vi: set ts=4 sw=4 et ft=dockerfile:
# vi: set ts=4 sw=4 et ft=dockerfile:
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment