Skip to content

Commit

Permalink
Ubuntu container
Browse files Browse the repository at this point in the history
  • Loading branch information
maxirmx committed Jun 25, 2024
1 parent 221669d commit f57a338
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 6 deletions.
10 changes: 10 additions & 0 deletions test/tebako-test-run.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# frozen_string_literal: true

puts "Hello!"
puts "Gem path: #{Gem.path}"
puts "Rubygems version: #{Gem::rubygems_version}"
if defined?(TebakoRuntime::VERSION)
puts "Using tebako-runtime v#{TebakoRuntime::VERSION}"
else
puts "Tebako runtime not loaded"
end
2 changes: 1 addition & 1 deletion tools/tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ install_ruby() {
tar -xzvf ruby-install-${RUBY_INSTALL_VERSION}.tar.gz
cd ruby-install-${RUBY_INSTALL_VERSION}
make install
ruby-install --system ruby ${RUBY_VERSION} -- CC=${CC}
ruby-install --system ruby ${RUBY_VERSION} -- --without-gmp --disable-dtrace --disable-debug-env --disable-install-doc CC=${CC}
popd
rm -rf ${ruby_install}
}
Expand Down
17 changes: 12 additions & 5 deletions ubuntu-20.04.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ ENV TZ=Etc/UTC
ENV ARCH=x64

RUN apt-get -y update
RUN apt-get -y install sudo wget git make clang-12 clang++-12 \
RUN apt-get -y install sudo wget git make pkg-config clang-12 clang++-12 \
binutils-dev libevent-dev acl-dev libfmt-dev libjemalloc-dev \
libdouble-conversion-dev libiberty-dev liblz4-dev liblzma-dev libssl-dev \
libboost-filesystem-dev libboost-program-options-dev libboost-system-dev \
libboost-iostreams-dev libboost-date-time-dev libboost-context-dev \
libboost-regex-dev libboost-thread-dev libbrotli-dev libunwind-dev \
libdwarf-dev libelf-dev libgoogle-glog-dev libffi-dev libgdbm-dev \
libyaml-dev libncurses-dev libreadline-dev libutfcpp-dev
libyaml-dev libncurses-dev libreadline-dev libutfcpp-dev libstdc++-10-dev

ENV CC=clang-12
ENV CXX=clang++-12
Expand All @@ -49,10 +49,17 @@ RUN /opt/tools/tools.sh install_cmake && \

RUN gem install tebako

RUN adduser --disabled-password --gecos "" tebako && \
ENV HOME=/home/tebako
RUN adduser --disabled-password --gecos "" --home $HOME tebako && \
printf "\ntebako\tALL=(ALL)\tNOPASSWD:\tALL" > /etc/sudoers.d/tebako

ENV HOME=/home/tebako
COPY test $HOME/test
USER tebako

RUN cd $HOME && tebako setup -p .tebako
RUN cd $HOME && \
tebako setup -p .tebako -R 3.1.5 && \
tebako setup -p .tebako -R 3.2.4 && \
tebako press -p .tebako -R 3.1.5 -r test -e tebako-test-run.rb -o ruby-3.1.5-package && \
tebako press -p .tebako -R 3.2.4 -r test -e tebako-test-run.rb -o ruby-3.2.4-package

CMD ["bash"]

0 comments on commit f57a338

Please sign in to comment.