Skip to content

Commit 51d4314

Browse files
committed
Move image building to OBS
To get updates to the base OS etc. automatically https://build.opensuse.org/package/show/openSUSE:infrastructure:dale/hackweek-base
1 parent 5652ea6 commit 51d4314

File tree

2 files changed

+5
-48
lines changed

2 files changed

+5
-48
lines changed

Dockerfile

+4-47
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,9 @@
1-
FROM registry.opensuse.org/opensuse/leap:15.4
1+
FROM registry.opensuse.org/opensuse/infrastructure/dale/containers/hackweek/base:latest
22
ARG CONTAINER_USERID=1000
33

4-
# Add needed repos
5-
RUN echo 'solver.allowVendorChange = true' >> /etc/zypp/zypp.conf; \
6-
zypper ar -f https://download.opensuse.org/repositories/openSUSE:/infrastructure:/dale/15.4/openSUSE:infrastructure:dale.repo; \
7-
zypper ar -f https://download.opensuse.org/repositories/devel:/languages:/ruby/15.4/devel:languages:ruby.repo; \
8-
zypper --gpg-auto-import-keys refresh
9-
10-
# Install requirements
11-
RUN zypper -n install --no-recommends --replacefiles \
12-
curl vim vim-data psmisc timezone ack glibc-locale sudo hostname \
13-
sphinx libxml2-devel libxslt-devel libffi-devel sqlite3-devel nodejs8 gcc-c++ \
14-
ImageMagick libmariadb-devel ruby3.1-devel make git-core mariadb-client \
15-
chromium xorg-x11-fonts; \
16-
zypper -n clean --all
17-
18-
# Add our user
19-
RUN useradd -m hackweek
20-
214
# Configure our user
225
RUN usermod -u $CONTAINER_USERID hackweek
236

24-
# Setup sudo
25-
RUN echo 'hackweek ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
26-
27-
# Disable versioned gem binary names
28-
RUN echo 'install: --no-format-executable' >> /etc/gemrc
29-
307
# We copy the Gemfiles into this intermediate build stage so it's checksum
318
# changes and all the subsequent stages (a.k.a. the bundle install call below)
329
# have to be rebuild. Otherwise, after the first build of this image,
@@ -35,32 +12,12 @@ ADD Gemfile /hackweek/Gemfile
3512
ADD Gemfile.lock /hackweek/Gemfile.lock
3613
RUN chown -R hackweek /hackweek
3714

38-
# Install bundler
39-
RUN gem.ruby3.1 install bundler -v "$(grep -A 1 "BUNDLED WITH" /hackweek/Gemfile.lock | tail -n 1)"; \
40-
gem.ruby3.1 install foreman
41-
42-
# Setup Ruby 3.1 as default
43-
RUN ln -sf /usr/bin/ruby.ruby3.1 /home/hackweek/bin/ruby; \
44-
ln -sf /usr/bin/gem.ruby3.1 /home/hackweek/bin/gem; \
45-
ln -sf /usr/bin/bundle.ruby3.1 /home/hackweek/bin/bundle; \
46-
ln -sf /usr/bin/rake.ruby3.1 /home/hackweek/bin/rake;
47-
ENV PATH /home/hackweek/bin:$PATH
48-
4915
WORKDIR /hackweek
5016
USER hackweek
5117

52-
# Setup shell history
53-
ADD --chown=hackweek:users .irbrc /home/hackweek/.irbrc
54-
RUN ln -sf /hackweek/tmp/.bash_history /home/hackweek/.bash_history; \
55-
ln -sf /hackweek/tmp/.irb_history /home/hackweek/.irb_history;
56-
57-
# Configure our bundle
58-
RUN bundle config build.ffi --enable-system-libffi; \
59-
bundle config build.nokogiri --use-system-libraries; \
60-
bundle config build.sassc --disable-march-tune-native;
61-
62-
# Install our bundle
63-
RUN bundle install --jobs=3 --retry=3
18+
# Install our bundle & process manager
19+
RUN bundle install --jobs=3 --retry=3; \
20+
gem install foreman
6421

6522
# Run our command
6623
CMD ["foreman", "start", "-f", "Procfile"]

Gemfile.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -445,4 +445,4 @@ DEPENDENCIES
445445
webdrivers
446446

447447
BUNDLED WITH
448-
2.3.3
448+
2.5.16

0 commit comments

Comments
 (0)