-
-
Notifications
You must be signed in to change notification settings - Fork 161
/
Dockerfile
40 lines (32 loc) · 932 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Instructions
# ------------
#
# Build the Docker image using:
#
# docker build -t test-aruba .
#
# You can pick any image name instead of test-aruba, of course. After the
# build is done, run bash interactively inside the image like so:
#
# docker run -v $PWD:/aruba --rm -it test-aruba:latest bash
#
# The `-v $PWD:/aruba` will make the container pick up any changes to the
# code, so you can edit and re-run the tests.
FROM ruby:3.4
# Create aruba user
RUN useradd -m -s /bin/bash aruba
RUN mkdir /aruba
RUN chown aruba:aruba /aruba
# Run the rest of the steps as non-root
USER aruba
WORKDIR /aruba
# Ensure Bundler 2.x is installed
RUN gem update bundler
# Add just the files needed for running bundle install
ADD Gemfile aruba.gemspec Manifest.txt /aruba/
ADD lib/aruba/version.rb /aruba/lib/aruba/version.rb
ADD exe/aruba /aruba/exe/aruba
# Install dependencies
RUN bundle
# Add the full source code
ADD . /aruba