forked from Linaro/Connect
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
99 lines (85 loc) · 3.09 KB
/
Dockerfile
File metadata and controls
99 lines (85 loc) · 3.09 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# For building the Linaro Connect website
# Set the base image to Ubuntu (version 18.04)
# Uses the new "ubuntu-minimal" image
# Should be Alpine like all the cool kids, but
FROM ubuntu:18.04
# File Authors / Maintainers
# Initial Maintainer
LABEL maintainer="Ciaran Moran"
################################################################################
# Basic APT commands
# Tell apt not to use interactive prompts
RUN export DEBIAN_FRONTEND=noninteractive && \
# Clean package cache and upgrade all installed packages
apt-get clean \
# No confirmation
-y && \
apt-get update && \
apt-get upgrade -y && \
# Clean up package cache in this layer
apt-get --purge autoremove -y && \
apt-get clean -y && \
# Restore interactive prompts
unset DEBIAN_FRONTEND
################################################################################
################################################################################
# Configure locale for jekyll build
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get install -y \
language-pack-en \
&& \
locale-gen en_US.UTF-8 \
&& \
# Set locale
dpkg-reconfigure locales && \
# Remove stale dependencies
apt-get --purge autoremove -y && \
apt-get clean -y
################################################################################
################################################################################
# Install latest software
# Change the date time stamp if you want to rebuild the image from this point down
# Useful for Dockerfile development
ENV SOFTWARE_UPDATED 2018-08-02.1203
# Install packages
# Add update && upgrade to this layer in case we're rebuilding from here down
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get upgrade -y && \
apt-get install -y --no-install-recommends \
# Jekyll prerequisites, https://jekyllrb.com/docs/installation/
build-essential \
# Ruby 2.5 development environment
ruby2.5-dev \
# rmagick requires MagickWand libraries
libmagickwand-dev \
&& \
apt-get --purge autoremove -y && \
apt-get clean -y
################################################################################
################################################################################
# Install Bundler
RUN gem install --conservative \
bundler \
jekyll
# Add update && upgrade to this layer in case we're rebuilding
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get upgrade -y && \
apt-get --purge autoremove -y && \
apt-get clean -y
################################################################################
################################################################################
# Create user accounts
RUN useradd --create-home --shell /bin/bash buildbot
################################################################################
################################################################################
# Dockerfile development only
ENV CONFIG_UPDATED 2018-08-02.1203
# COPY Gemfile /srv/Gemfile
################################################################################
# Run as user buildbot
USER buildbot:buildbot
WORKDIR /srv
EXPOSE 4000
CMD /bin/bash