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 and dependencies required for container build [RHELDST-1303] #6

Merged

Conversation

crungehottman
Copy link
Member

This commit introduces the Dockerfile required to build the container
to be deployed to PSI.

This commit also includes additional dependencies required to package
and deploy exodus-gw on OpenShift PSI.

openshift/containers/exodus-gw/Dockerfile Outdated Show resolved Hide resolved
openshift/containers/exodus-gw/Dockerfile Outdated Show resolved Hide resolved
requirements.in Outdated Show resolved Hide resolved
openshift/containers/exodus-gw/Dockerfile Outdated Show resolved Hide resolved
@crungehottman crungehottman force-pushed the RHELDST-1303 branch 2 times, most recently from 32b2380 to 9fa1f22 Compare July 29, 2020 15:35
@crungehottman crungehottman requested review from rohanpm and removed request for dichn July 30, 2020 13:53
&& pip3 install --require-hashes -r requirements.txt \
&& pip3 install --no-deps . \
# Clean up unnecessary data
&& microdnf clean all && rm -rf /var/yum/cache && rm -rf /usr/local/src/exodus-gw
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just checking, does microdnf still use /var/yum/cache ? They didn't relocate the cache or change how it works?

The reason I ask is that "rm -rf foo/bar/baz" doesn't fail if the given path never existed in the first place - so this command succeeding doesn't necessarily mean it makes sense.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It appears that microdnf has not changed the location of the cache nor its caching behavior, but yum cache is stored in /var/cache/yum, not /var/yum/cache.

Fixed:
before (microdnf clean all removed some cache but ignored rm -rf /var/yum/cache, as the dir does not exist):

[crungeho@localhost exodus-gw]$ podman ps
CONTAINER ID  IMAGE                                  COMMAND  CREATED         STATUS             PORTS                   NAMES
b8fcfd563763  quay.io/exodus/exodus-gw:RHELDST-1303           10 seconds ago  Up 10 seconds ago  0.0.0.0:8080->8080/tcp  laughing_wozniak
[crungeho@localhost exodus-gw]$ podman exec -it b8fcfd563763 ls /var/cache/yum
lock

after (entire /var/cache/yum directory removed):

[crungeho@localhost exodus-gw]$ podman ps
CONTAINER ID  IMAGE                            COMMAND  CREATED        STATUS            PORTS                   NAMES
85ab311eeb21  localhost/exodus-gw/test:latest           4 seconds ago  Up 4 seconds ago  0.0.0.0:8080->8080/tcp  lucid_zhukovsky
[crungeho@localhost exodus-gw]$ podman exec -it 85ab311eeb21 ls /var/cache/yum
ls: cannot access '/var/cache/yum': No such file or directory
Error: exec session exited with non-zero exit code 2: OCI runtime error
[crungeho@localhost exodus-gw]$ podman exec -it 85ab311eeb21 ls /var/cache
ldconfig

openshift/containers/exodus-gw/Dockerfile Outdated Show resolved Hide resolved
@rohanpm
Copy link
Member

rohanpm commented Jul 30, 2020

I'd suggest rebasing this as well, as there are conflicts in requirements.in & requirements.txt.

I'd expect the conflicts in requirements.txt to require running pip-compile again, i.e. git probably will not be able to automatically resolve them.

@crungehottman crungehottman force-pushed the RHELDST-1303 branch 2 times, most recently from c8fab46 to ac3a5cf Compare July 31, 2020 15:02
…-1303]

This commit introduces the Dockerfile required to build the container
to be deployed on PSI.

This commit also includes additional dependencies required to package
and deploy exodus-gw on OpenShift PSI.
@crungehottman crungehottman merged commit 7a93a98 into release-engineering:master Aug 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants