forked from puppetlabs/bolt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.bolt-server
37 lines (30 loc) · 1.27 KB
/
Dockerfile.bolt-server
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
# Install gems
FROM alpine:3.14 as build
RUN \
apk --no-cache add build-base ruby-dev ruby-bundler ruby-json ruby-bigdecimal git openssl-dev linux-headers \
&& echo 'gem: --no-document' > /etc/gemrc \
&& mkdir /bolt-server
# Gemfile requires gemspec which requires bolt/version which requires bolt
ADD . /bolt-server
WORKDIR /bolt-server
RUN bundle config --local silence_root_warning 1 \
&& bundle config --local path 'vendor/bundle' \
&& bundle install --no-cache --jobs=$(nproc)
# Final image
FROM alpine:3.14
ARG bolt_version=no-version
LABEL org.label-schema.maintainer="Puppet Bolt Team <[email protected]>" \
org.label-schema.vendor="Puppet" \
org.label-schema.url="https://github.com/puppetlabs/bolt" \
org.label-schema.name="PE Bolt Server" \
org.label-schema.license="Apache-2.0" \
org.label-schema.version=${bolt_version} \
org.label-schema.vcs-url="https://github.com/puppetlabs/bolt" \
org.label-schema.dockerfile="/Dockerfile"
RUN \
apk --no-cache add ruby openssl ruby-bundler ruby-json ruby-bigdecimal
COPY --from=build /bolt-server /bolt-server
WORKDIR /bolt-server
EXPOSE 62658
ENV BOLT_SERVER_CONF /bolt-server/config/docker.conf
ENTRYPOINT bundle exec puma -C /bolt-server/config/transport_service_config.rb