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
Official Docker Image with Travis CI integration #99
Open
jstarcher
wants to merge
17
commits into
JoeDog:master
Choose a base branch
from
jstarcher:master
base: master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
600af6a
Include sys/types.h in src/hash.c
joshuamorris3 901bf24
Add Dockerfile, merge in https://github.com/JoeDog/siege/pull/42
jstarcher 1d8c55e
Updates to Dockerfile
jstarcher 91e560e
Trigger docker build
jstarcher d051c6b
Add zlib to Dockerfile
jstarcher 2f5ef0c
Use glibc and compiled artifact instead due to segfault
jstarcher 062173f
Add travis ci docker integration
jstarcher c8613ad
Fix travis dir
jstarcher b7ab45b
Fix travis dir
jstarcher 8eb4e09
Fix docker login
jstarcher e211716
Fix docker bug in travis file
jstarcher ab198e9
Add zlib to docker image
jstarcher 0ba7946
Add zlib to docker image
jstarcher 1610e1b
Add siege.config and bombardment to docker
jstarcher 6a0e46e
Add zlib to docker image
jstarcher 071296c
Add zlib to docker image
jstarcher d8ed7fa
Add zlib to docker image
jstarcher File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,5 +32,9 @@ utils/bombardment | |
utils/siege.config | ||
utils/siege2csv.pl | ||
|
||
# Docker | ||
docker/build/ | ||
|
||
# Others | ||
tags | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
language: c | ||
|
||
sudo: required | ||
|
||
services: | ||
- docker | ||
|
||
before_install: | ||
- docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" | ||
- docker pull ubuntu | ||
- cd docker | ||
- ./run.sh | ||
- export REPO=jstarcher/siege | ||
- export TAG=`if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo $TRAVIS_BRANCH ; fi` | ||
- docker build -t $REPO:$TAG . | ||
- docker push $REPO | ||
|
||
script: | ||
- docker run --rm -t jstarcher/siege -c1 -r1 jstarcher.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
FROM frolvlad/alpine-glibc:alpine-3.5 | ||
|
||
COPY build/siege /usr/bin/siege | ||
COPY build/siege.config /usr/bin/siege.config | ||
COPY build/bombardment /usr/bin/bombardment | ||
|
||
ENTRYPOINT ["siege"] | ||
|
||
CMD ["--help"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
apt-get update \ | ||
&& apt-get install -y build-essential automake curl openssl jq zlib1g-dev \ | ||
&& LATEST=$(curl -s https://api.github.com/repos/JoeDog/siege/tags | jq --raw-output '.[0]["tarball_url"]') \ | ||
&& curl -L -o siege.tar.gz $LATEST \ | ||
&& tar xvvzf siege.tar.gz \ | ||
&& cd JoeDog* \ | ||
&& utils/bootstrap \ | ||
&& ./configure \ | ||
&& make \ | ||
&& make install \ | ||
&& cp /usr/local/bin/siege /opt/siege \ | ||
&& cp /usr/local/bin/bombardment /opt/siege \ | ||
&& cp /usr/local/bin/siege.config /opt/siege | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env bash | ||
|
||
rm -rf build | ||
mkdir build | ||
|
||
docker run --rm -t -v $PWD/build:/opt/siege -v $PWD/compile.sh:/opt/compile.sh ubuntu bash /opt/compile.sh | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Personally, I like using the virtual package option of apk to install dependencies, compile, then uninstall dependencies - all in one layer. That way a single |
||
docker build . -t jstarcher/siege:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would feel uneasy about relying on an unofficial base image.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. But the problem is that alpine uses musl libc and so we have to get some glibc package in there because otherwise siege will just segfault.
Some other potential solution is to use an official alpine image and install https://github.com/sgerrand/alpine-pkg-glibc in the dockerfile but that means we rely on that as a somewhat sketchy other thingy.