2021-08-30 22:04:31 +00:00
|
|
|
FROM ubuntu:20.04
|
2020-06-17 01:36:11 +00:00
|
|
|
|
2020-07-08 02:13:35 +00:00
|
|
|
# Expose port for the Portainer UI and Edge server
|
2020-06-17 01:36:11 +00:00
|
|
|
EXPOSE 9000
|
2021-09-13 21:46:59 +00:00
|
|
|
EXPOSE 9443
|
2020-07-08 02:13:35 +00:00
|
|
|
EXPOSE 8000
|
2020-06-17 01:36:11 +00:00
|
|
|
|
|
|
|
WORKDIR /src/portainer
|
|
|
|
|
|
|
|
# Set TERM as noninteractive to suppress debconf errors
|
|
|
|
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
|
|
|
|
|
|
|
|
# Set default go version
|
2022-01-10 00:10:02 +00:00
|
|
|
ARG GO_VERSION=go1.17.6.linux-amd64
|
2020-06-17 01:36:11 +00:00
|
|
|
|
|
|
|
# Install packages
|
|
|
|
RUN apt-get update --fix-missing && apt-get install -qq \
|
2022-01-10 00:10:02 +00:00
|
|
|
dialog \
|
|
|
|
apt-utils \
|
|
|
|
curl \
|
|
|
|
build-essential \
|
|
|
|
git \
|
|
|
|
wget \
|
|
|
|
apt-transport-https \
|
|
|
|
ca-certificates \
|
|
|
|
gnupg-agent \
|
|
|
|
software-properties-common
|
2021-08-30 22:04:31 +00:00
|
|
|
|
|
|
|
# Install Docker CLI
|
|
|
|
RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - \
|
2022-01-10 00:10:02 +00:00
|
|
|
&& add-apt-repository \
|
|
|
|
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
|
|
|
|
$(lsb_release -cs) \
|
|
|
|
stable" \
|
|
|
|
&& apt-get update \
|
|
|
|
&& apt-get install -y docker-ce-cli
|
2021-08-30 22:04:31 +00:00
|
|
|
|
|
|
|
|
|
|
|
# Install NodeJS
|
|
|
|
RUN curl -fsSL https://deb.nodesource.com/setup_14.x | bash - \
|
2022-01-10 00:10:02 +00:00
|
|
|
&& apt-get install -y nodejs
|
2020-06-17 01:36:11 +00:00
|
|
|
|
|
|
|
# Install Yarn
|
|
|
|
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
|
2021-07-14 01:10:42 +00:00
|
|
|
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
|
|
|
|
&& apt-get update && apt-get -y install yarn
|
2020-06-17 01:36:11 +00:00
|
|
|
|
|
|
|
# Install Golang
|
|
|
|
RUN cd /tmp \
|
2021-07-14 01:10:42 +00:00
|
|
|
&& wget -q https://dl.google.com/go/${GO_VERSION}.tar.gz \
|
|
|
|
&& tar -xf ${GO_VERSION}.tar.gz \
|
|
|
|
&& mv go /usr/local
|
2020-06-17 01:36:11 +00:00
|
|
|
|
2021-08-30 22:04:31 +00:00
|
|
|
# Copy run script
|
|
|
|
COPY run.sh /
|
|
|
|
RUN chmod +x /run.sh
|
2020-06-17 01:36:11 +00:00
|
|
|
|
2021-08-30 22:04:31 +00:00
|
|
|
ENTRYPOINT ["/run.sh"]
|