-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
49 lines (41 loc) · 1.08 KB
/
Dockerfile
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
# ---------------------------------------------------------
# Volta
# ---------------------------------------------------------
# The version of Debian to use.
# (Defaults to bullseye)
ARG DEBIAN_VERSION=bullseye
FROM debian:$DEBIAN_VERSION
# The version of Volta to install.
# (Defaults to latest)
ARG VERSION=latest
ENV VOLTA_VERSION $VERSION
RUN \
# Update packages
apt-get update \
#
# Install package dependencies
&& apt-get install -y \
ca-certificates \
curl \
--no-install-recommends \
#
# Remove package lists
&& rm -rf /var/lib/apt/lists/* \
#
# Remove recommended packages to reduce image
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false
SHELL ["/bin/bash", "-c"]
ENV BASH_ENV ~/.bashrc
ENV VOLTA_HOME /root/.volta
ENV PATH $VOLTA_HOME/bin:$PATH
RUN \
# Install Volta
if [ "$VERSION" = "latest" ]; \
then \
curl https://get.volta.sh | bash; \
else \
curl https://get.volta.sh | bash -s -- --version $VERSION; \
fi \
# Test install
&& ls -l ~/.volta/bin \
&& volta --version