-
Notifications
You must be signed in to change notification settings - Fork 12
/
Dockerfile.tmpl.erb
25 lines (25 loc) · 977 Bytes
/
Dockerfile.tmpl.erb
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
# Embedded Ruby template
# lines beginning with "#erb:" are embedded ruby lines, processing is done in Makefile so there is no syntax error in Dockerfile
# arg: arg_gem: specify a gemfile or a gem version
# cspell:ignore cliuser optipng
# Review the version of ruby to be used periodically from : https://hub.docker.com/_/ruby
FROM ruby:3.2.2
#erb: if arg_gem.end_with?('.gem')
# For beta gem is file, then copy it
COPY <%=arg_gem%> .
# if a gem file was provided, once copied in container: use the basename only
#erb: arg_gem=File.basename(arg_gem)
#erb: end
# Install gem (beta or release), optional gems and other packages
RUN \
gem install <%=arg_gem%> && \
useradd -m -u 1000 -s /bin/bash cliuser && \
chown -R cliuser: /home/cliuser && \
rm -f <%=arg_gem%>
# rootless execution
USER cliuser
# The default dir when starting the docker container.
WORKDIR /home/cliuser
# Install SDK, create key files and check that ascp works
ENTRYPOINT ["ets_to_hass"]
CMD ["-h"]