Skip to content

Commit

Permalink
Update docker for local testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Ondrej Janus committed Oct 4, 2023
1 parent 5f3f44a commit 06f9410
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 171 deletions.
90 changes: 0 additions & 90 deletions .s2i/bin/assemble

This file was deleted.

42 changes: 0 additions & 42 deletions .s2i/bin/run

This file was deleted.

1 change: 0 additions & 1 deletion .s2i/environment

This file was deleted.

3 changes: 0 additions & 3 deletions .s2i/lib/plantuml

This file was deleted.

Binary file removed .s2i/lib/plantuml.jar
Binary file not shown.
34 changes: 15 additions & 19 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,25 +1,21 @@
FROM centos/ruby-27-centos7
FROM ruby:2.7-slim-bullseye

LABEL name="candlepin/website-ruby-27" \
maintainer="Alex Wood <[email protected]>"
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
git \
graphviz \
plantuml \
python3 \
&& rm -rf /var/lib/apt/lists/*

USER root
COPY Gemfile* .
RUN bundle install && \
rm -rf Gemfile*

RUN yum install -y --setopt=tsflags=nodocs java-1.8.0-openjdk-devel graphviz python3 && \
yum clean all -y
EXPOSE 4000

# Keep this value up to date with the BUNDLED WITH version in Gemfile.lock
RUN gem install bundler:2.3.10
WORKDIR /site

COPY ./.s2i/lib/plantuml.jar /usr/share/java/plantuml.jar
COPY ./.s2i/lib/plantuml /usr/bin/plantuml
RUN chmod 755 /usr/bin/plantuml

COPY ./.s2i/bin/ $STI_SCRIPTS_PATH

# Drop the root user and make the content of /opt/app-root owned by user 1001
RUN chown -R 1001:0 ${APP_ROOT} && chmod -R ug+rwx ${APP_ROOT} && \
rpm-file-permissions

USER 1001
ENTRYPOINT [ "jekyll" ]

CMD [ "--help" ]
16 changes: 0 additions & 16 deletions Dockerfile.dev

This file was deleted.

5 changes: 5 additions & 0 deletions local_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

podman build -t candlepin/jekyll -f Dockerfile

podman run -p 4000:4000 -v "$(pwd)":/site candlepin/jekyll serve --force_polling -H "0.0.0.0" -P 4000

0 comments on commit 06f9410

Please sign in to comment.