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 #107

Merged
merged 1 commit into from
Oct 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
add initial Dockerfile
cleanup apk after install

update for security notes

add no-cache to apk
goatshriek committed Oct 29, 2024

Verified

This commit was signed with the committer’s verified signature. The key has expired.
nhooyr Anmol Sethi
commit 5c90baace89d9e3bc1f69c136ff50c154723801f
11 changes: 11 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -65,6 +65,17 @@ jobs:
run: bundle exec rake test:python
- name: Run Python Examples
run: bundle exec rake examples:python
docker:
runs-on: ubuntu-latest
name: docker build
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1
- uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0
with:
file: 'tools/docker/Dockerfile'
push: false
tags: 'wrapture'
sonar-analysis:
runs-on: ubuntu-latest
name: SonarCloud analysis
7 changes: 7 additions & 0 deletions tools/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Development Tools
This directory has configuration and support files for external tools that are
used in Wrapture development.


## docker
Contains the Dockerfile used to build the wrapture container image.
22 changes: 22 additions & 0 deletions tools/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM ruby:3.3.5-alpine3.20

# copy the build-necessary source into the container
WORKDIR /usr/src/wrapture
COPY bin ./bin
COPY lib ./lib
COPY sig ./sig
COPY Gemfile wrapture.gemspec ./

# set up the environment for the build
RUN apk update \
&& apk add --no-cache --virtual build-dependencies build-base \
&& bundle install \
&& gem build --output wrapture.gem wrapture.gemspec \
&& gem install wrapture.gem \
&& apk del build-dependencies \
&& addgroup -S wrapture \
&& adduser -S wrapture -G wrapture

# set the user to wrapture
WORKDIR /home/wrapture
USER wrapture