mirror of
https://github.com/puppetlabs/vmfloaty.git
synced 2026-01-25 21:28:40 -05:00
Use Dockerfile for publishing an image
This commit is contained in:
parent
d50e903167
commit
dba1215db4
2 changed files with 21 additions and 7 deletions
|
|
@ -3,10 +3,7 @@
|
|||
**/*.md
|
||||
**/*example
|
||||
**/Dockerfile*
|
||||
Gemfile.lock
|
||||
Rakefile
|
||||
coverage
|
||||
spec
|
||||
examples
|
||||
scripts
|
||||
vendor
|
||||
|
|
|
|||
25
Dockerfile
25
Dockerfile
|
|
@ -1,6 +1,23 @@
|
|||
FROM ruby:3.1.1-slim-buster
|
||||
FROM ruby:3.1.3-slim-bullseye
|
||||
|
||||
COPY ./ ./
|
||||
LABEL org.opencontainers.image.authors="@puppetlabs/release-engineering"
|
||||
LABEL org.opencontainers.image.title="vmfloaty"
|
||||
LABEL org.opencontainers.image.source=https://github.com/puppetlabs/vmfloaty
|
||||
LABEL org.opencontainers.image.description="A CLI helper tool for VMPooler"
|
||||
|
||||
RUN apt-get update && apt-get install -y less
|
||||
RUN gem install bundler && bundle install && gem build vmfloaty.gemspec && gem install vmfloaty*.gem
|
||||
RUN apt-get update -qq && apt-get install -y build-essential less make openssh-client
|
||||
|
||||
RUN groupadd --gid 1000 floatygroup \
|
||||
&& useradd --uid 1000 --gid 1000 -m floatyuser
|
||||
|
||||
USER floatyuser
|
||||
|
||||
WORKDIR /home/floatyuser/app
|
||||
COPY --chown=floatyuser:floatygroup . .
|
||||
|
||||
RUN gem install bundler \
|
||||
&& bundle install \
|
||||
&& gem build vmfloaty.gemspec \
|
||||
&& gem install vmfloaty*.gem
|
||||
|
||||
ENTRYPOINT [ "floaty" ]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue