Skip to content

Commit 5bc9e90

Browse files
committed
use venv
1 parent eec929a commit 5bc9e90

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

Dockerfile.ubuntu24.04.bats

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,19 @@ MAINTAINER Gruntwork <info@gruntwork.io>
33

44
# Install basic dependencies
55
RUN apt-get update && \
6-
DEBIAN_FRONTEND=noninteractive apt-get install -y git vim python3-pip jq sudo curl libffi-dev python3-dev
6+
DEBIAN_FRONTEND=noninteractive apt-get install -y git vim python3-pip jq sudo curl libffi-dev python3-dev python3.12-venv
77

88
# Install Bats
99
RUN git clone https://github.com/bats-core/bats-core.git /tmp/bats-core && \
1010
/tmp/bats-core/install.sh /usr/local && \
1111
rm -r /tmp/bats-core
1212

13-
# Upgrade pip
14-
RUN pip3 install -U pip
13+
# enable venv
14+
RUN python3 -m venv /opt/venv
15+
ENV PATH="/opt/venv/bin:$PATH"
1516

16-
# Install AWS CLI
17-
RUN pip3 install awscli --upgrade --user
18-
19-
# Install moto: https://github.com/spulec/moto
20-
# Lock cfn-lint and pysistent to last known working versions
21-
RUN pip3 install flask moto moto[server] cfn-lint pyrsistent
17+
RUN pip3 install awscli --upgrade && \
18+
pip3 install flask moto moto[server] cfn-lint pyrsistent
2219

2320
# Install tools we'll need to create a mock EC2 metadata server
2421
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y net-tools iptables

0 commit comments

Comments
 (0)