-
Notifications
You must be signed in to change notification settings - Fork 145
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 RPM packaging for 18.09.x #131
Conversation
lightweight container. | ||
|
||
Docker containers are both hardware-agnostic and platform-agnostic. This means | ||
they can run anywhere, from your laptop to the largest EC2 compute instance and |
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 feel like we have a reworded version of this somewhere.
I could be mistaken, but I think there are things like the largest EC2 instance now says something like largest cloud instance.
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.
We probably did, that can be part of a follow up PR by the docs team to align this with our current EE packaging. This PR is meant to get RPM packaging up so we can start testing it with our internal pipelines.
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 could be mistaken, but I think there are things like the largest EC2 instance now says something like largest cloud instance.
As a data point, I noticed that specific wording change ("largest EC2 instance" → "largest cloud instance") as well when looking at diffs between .spec file versions a few days ago. From my point of view, it definitely makes sense. 😄
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.
Is docker-ce.spec what will be used for the meta package?
For the cli package did you essentially remove all the engine related steps?
If so can we remove some of the packages that are installed in the Dockerfile?
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.
LGTM
Talked to Eli there is a tracking issue to remove the unnecessary dependencies from the Dockerfile.
Hmmm, trying this out on my CentOS 7 x64 desktop, the $ export ENGINE_DIR=~/go/src/github.com/docker/engine
$ export CLI_DIR=~/go/src/github.com/docker/cli
$ make centos
mkdir -p rpmbuild/SOURCES
docker run --rm -i -w /v \
-v /home/jc/git_repos/docker-ce-packaging/rpm/../../cli:/cli \
-v /home/jc/git_repos/docker-ce-packaging/rpm/rpmbuild/SOURCES:/v \
alpine \
tar -C / -c -z -f /v/cli.tgz --exclude .git cli
Unable to find image 'alpine:latest' locally
latest: Pulling from library/alpine
8e3ba11ec2a2: Pull complete
Digest: sha256:7043076348bf5040220df6ad703798fd8593a0918d06d3ce30c6c93be117e430
Status: Downloaded newer image for alpine:latest
Unknown option: -C
usage: git [--version] [--help] [-c name=value]
[--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
[-p|--paginate|--no-pager] [--no-replace-objects] [--bare]
[--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
<command> [<args>]
Unknown option: -C
usage: git [--version] [--help] [-c name=value]
[--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
[-p|--paginate|--no-pager] [--no-replace-objects] [--bare]
[--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
<command> [<args>]
Unknown option: -C
usage: git [--version] [--help] [-c name=value]
[--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
[-p|--paginate|--no-pager] [--no-replace-objects] [--bare]
[--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
<command> [<args>]
date: invalid date '@'
[etc] Haven't investigated yet, but will do so shortly. |
On a side note, the previous .spec file included the |
Yeah that'd be due to the |
Thanks @seemethere. I'll try it all in a Fedora 28 VM instead then. That's likely to bundle a much newer git. |
Ahhh, it looks like newer Git is available in the Red Hat software collections: https://www.softwarecollections.org/en/scls/rhscl/rh-git29/ That works. 😄 |
Ahhh, grokking this PR now. Looks like a work in progress, with initial focus on getting the cli bits into decent shape and the engine piece can come later. For that purpose, this seems ok so far. 😄 I'll have a go at building in a minimal CentOS 7 box shortly, to work out the correct BuildRequires dependencies too. |
For anyone else interested in testing on CentOS 7, these seem to be the essential steps for initial setup from a basic "Minimal" CentOS 7 install: 1. Install newer git than default CentOS provided one
2. Install Docker CE
3. Grab the required Docker source pieces
That last repo ( 4. Build the rpm
This info would likely be useful in a wiki section for this repo. Is there any chance of getting the wiki enabled here? |
8e5ccb0
to
f6e7b85
Compare
Splits out the docker-ce package and docker-ce-cli package into their own things. Still TODO: need to have a cleanup on the dependencies for the Dockerfiles Signed-off-by: Eli Uriegas <[email protected]>
Signed-off-by: Eli Uriegas <[email protected]>
Signed-off-by: Eli Uriegas <[email protected]>
Also split off containerd.mk into it's own thing since most of this stuff will be re-used with debian packaging anyways. Signed-off-by: Eli Uriegas <[email protected]>
rpmlint checks can be re-added later Signed-off-by: Eli Uriegas <[email protected]>
Signed-off-by: Eli Uriegas <[email protected]>
a4a4c21
to
94a1918
Compare
Signed-off-by: Eli Uriegas <[email protected]>
Why didn't we do this the whole time? `¯\_(ツ)_/¯` Signed-off-by: Eli Uriegas <[email protected]>
Signed-off-by: Eli Uriegas <[email protected]>
Signed-off-by: Eli Uriegas <[email protected]>
Old versions of things on CentOS 7 strike again! infinity is not a thing for TimeoutSec on systemd < 229 Signed-off-by: Eli Uriegas <[email protected]>
@@ -0,0 +1,11 @@ | |||
{ | |||
"image": "docker.io/seemethere/engine-community:0.0.0-20180814124044-678d4b3a6d.x86_64", |
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.
This probably shouldn't be pointing to seemethere
's hub org.
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.
This is currently just for development purposes. I'll have a follow up PR after I finish up Deb packaging as well to make this configurable.
SPECS/docker-ce.spec SPECS/docker-ce-cli.spec | ||
|
||
SOURCE_FILES=containerd-proxy.tgz cli.tgz containerd-shim-process.tar docker.service dockerd.json | ||
SOURCES=$(addprefix rpmbuild/SOURCES/, $(SOURCE_FILES)) |
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.
Pretty cool
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.
Confused about the docker-ce.spec logic.
@@ -45,49 +45,49 @@ debian: debian-stretch debian-jessie ## build all debian deb packages | |||
raspbian: raspbian-stretch debian-jessie ## build all raspbian deb packages | |||
|
|||
.PHONY: ubuntu-xenial | |||
ubuntu-xenial: engine-$(ARCH).tar ## build ubuntu xenial deb packages |
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.
Ideally these changes would be in a separate request.
(These aren't RPM changes)
# clear any old state | ||
rm -f %{_localstatedir}/lib/rpm-state/docker-is-active > /dev/null 2>&1 || : | ||
|
||
# check if docker service is running |
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.
Can you provide more context to your comments?
Like stop docker service if it is running.
# check if docker service is running | ||
if systemctl is-active docker > /dev/null 2>&1; then | ||
systemctl stop docker > /dev/null 2>&1 || : | ||
touch %{_localstatedir}/lib/rpm-state/docker-is-active > /dev/null 2>&1 || : |
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.
Why is docker being stopped but the docker-is-active file is being touched?
# check if docker was running before upgrade | ||
if [ -f %{_localstatedir}/lib/rpm-state/docker-is-active ]; then | ||
systemctl start docker > /dev/null 2>&1 || : | ||
rm -f %{_localstatedir}/lib/rpm-state/docker-is-active > /dev/null 2>&1 || : |
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.
Why is the is active file being removed?
Isn't docker active after systemctl start docker
?
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.
Talked with Eli changes that I were confused about have been part of spec file since before these changes.
LGTM!
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.
LGTM
Splits out the docker-ce package and docker-ce-cli package into their
own things.
Includes functionality for running dockerd as a host process that's managed by containerd.
Dependencies include:
Still TODO: (as in stuff for other PR's)
dockerd.json
Still TODO: need to have a cleanup on the dependencies for theThis is doneDockerfiles
NOTE: this relies on functionality being added here: docker/cli#1260There's no dependency on this anymoreSigned-off-by: Eli Uriegas [email protected]