Skip to content

Commit

Permalink
Update container check
Browse files Browse the repository at this point in the history
  • Loading branch information
HarlemSquirrel committed Feb 19, 2024
1 parent 4c653c1 commit aced562
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 3 deletions.
23 changes: 23 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/.bundle/
/.yardoc
/_yardoc/
/coverage/
/doc/
/pkg/
/spec/reports/
/tmp/

*.bundle
*.so
*.o
*.a
mkmf.log

# rspec failure tracking
.rspec_status

# Added by cargo
/target

# Built gems
*.gem
13 changes: 11 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
FROM ruby:3.2.3
WORKDIR /app

# Install the requirements we need to build the native Rust extensions
RUN apt-get update -qq && \
apt-get upgrade -y && \
apt-get install -y libclang-dev
COPY Gemfile /app

# Package and install the gem
COPY . /app
RUN gem build tzf.gemspec
RUN gem install tzf-*.gem

# Run a sanity check
WORKDIR /app/docker
RUN bundle install
CMD echo 'Hello, world!'
CMD ruby sanity_check.rb
2 changes: 1 addition & 1 deletion docker/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ source "https://rubygems.org"

# gem "rb_sys", "0.9.87"

gem "tzf", git: "https://github.com/HarlemSquirrel/tzf-rb", branch: "bundle-update-20240219"
gem "tzf"
5 changes: 5 additions & 0 deletions docker/sanity_check.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
require "bundler/setup"
require "tzf"

puts TZF::VERSION
puts TZF.tz_name(40.74771675713742, -73.99350390136448)

0 comments on commit aced562

Please sign in to comment.