setuid + wget simplification

This commit is contained in:
Disassembler 2018-09-06 21:15:43 +02:00
parent 26bbab959f
commit 6ca49d4865
No known key found for this signature in database
GPG Key ID: 524BD33A0EE29499
7 changed files with 8 additions and 16 deletions

View File

@ -5,10 +5,8 @@ LAYER activemq/activemq
SCRIPT
# Download and install ActiveMQ
wget http://archive.apache.org/dist/activemq/5.15.5/apache-activemq-5.15.5-bin.tar.gz -O /tmp/activemq.tgz
tar xf /tmp/activemq.tgz -C /srv
wget http://archive.apache.org/dist/activemq/5.15.5/apache-activemq-5.15.5-bin.tar.gz -O - | tar xzf - -C /srv
mv /srv/apache-activemq-5.15.5 /srv/activemq
rm -f /tmp/activemq.tgz
# Create OS user
addgroup -S -g 61616 activemq

View File

@ -10,10 +10,8 @@ SCRIPT
apk --no-cache add --virtual .deps build-base autoconf gdbm-dev libressl-dev linux-headers readline-dev zlib-dev
# Download and unpack Ruby
wget http://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.6.tar.xz -O ruby.tar.xz
mkdir -p /usr/src/ruby
tar xJf ruby.tar.xz -C /usr/src/ruby --strip-components=1
rm ruby.tar.xz
wget http://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.6.tar.xz -O - | tar xJf - -C /usr/src/ruby --strip-components=1
cd /usr/src/ruby
# Hackfix to suppress "Insecure world writable dir" warning

View File

@ -5,8 +5,7 @@ LAYER shared/tomcat
SCRIPT
# Install Tomcat 8
wget http://mirror.hosting90.cz/apache/tomcat/tomcat-8/v8.0.53/bin/apache-tomcat-8.0.53.tar.gz -O /tmp/apache-tomcat-8.tgz
tar xf /tmp/apache-tomcat-8.tgz -C /srv
wget http://mirror.hosting90.cz/apache/tomcat/tomcat-8/v8.0.53/bin/apache-tomcat-8.0.53.tar.gz | tar xzf - -C /srv
mv /srv/apache-tomcat-8.0.53 /srv/tomcat
# Make catalina.sh available globally
@ -14,7 +13,6 @@ SCRIPT
# Cleanup
rm -rf /srv/tomcat/webapps/ROOT /srv/tomcat/webapps/docs /srv/tomcat/webapps/examples /srv/tomcat/webapps/host-manager /srv/tomcat/webapps/manager
rm -f /tmp/apache-tomcat-8.tgz
RUN
COPY lxc-tomcat

View File

@ -35,7 +35,7 @@ fi
# Populate database
lxc-execute -n ckan -- paster --plugin=ckan db init -c /etc/ckan/ckan.ini
lxc-execute -n ckan -- paster --plugin=ckanext-spatial spatial initdb -c /etc/ckan/ckan.ini
lxc-execute -n ckan -- paster --plugin=ckan datastore set-permissions -c /etc/ckan/ckan.ini | lxc-execute -n postgres -- psql
lxc-execute -n ckan -- paster --plugin=ckan datastore set-permissions -c /etc/ckan/ckan.ini | lxc-attach -n postgres -- psql
chown -R 8003:8003 /srv/ckan/data
# Create admin account

View File

@ -21,4 +21,4 @@ RUN
MOUNT /srv/postgres/data var/lib/postgresql
USER 5432 5432
CMD /init.lxc.static -- /usr/bin/postgres -D /var/lib/postgresql
CMD s6-setuidgid 5432:5432 /usr/bin/postgres -D /var/lib/postgresql

View File

@ -15,4 +15,4 @@ MOUNT /srv/redis/conf/redis.conf etc/redis.conf
MOUNT /srv/redis/data var/lib/redis
USER 6379 6379
CMD redis-server /etc/redis.conf
CMD s6-setuidgid 6379:6379 /usr/bin/redis-server /etc/redis.conf

View File

@ -8,11 +8,9 @@ SCRIPT
apk --no-cache add bash lsof
# Download and install Solr
wget http://archive.apache.org/dist/lucene/solr/6.5.1/solr-6.5.1.tgz -O /tmp/solr-6.5.1.tgz
mkdir /opt
tar xzf /tmp/solr-6.5.1.tgz -C /opt/
wget http://archive.apache.org/dist/lucene/solr/6.5.1/solr-6.5.1.tgz -O - | tar xzf - -C /opt/
mv /opt/solr-6.5.1 /opt/solr
rm -f /tmp/solr-6.5.1.tgz
# Create OS user
addgroup -S -g 8983 solr
@ -29,4 +27,4 @@ RUN
MOUNT /srv/solr/data var/lib/solr
USER 8983 8983
CMD solr start -f
CMD s6-setuidgid 5432:5432 /usr/bin/solr start -f