-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
dockerfile
55 lines (45 loc) · 1.7 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
50
51
52
53
54
#
# This image is used to test github workflows locally
#
# Use the official Ubuntu base image
FROM ubuntu:latest
# Set the maintainer label
LABEL maintainer="gabrielgcr45@gmail.com"
# Install curl, build-essentials, and other dependencies
RUN apt-get update && \
apt-get install -y \
curl \
build-essential \
git \
pkg-config \
libssl-dev \
sudo \
zip \
qemu \
qemu-user-static
# Install Node.js
RUN curl -fsSL https://deb.nodesource.com/setup_21.x | bash - && \
apt-get install -y nodejs
# Install Rust using rustup
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
# Add cargo to PATH
ENV PATH="/root/.cargo/bin:${PATH}"
# Install the GitHub CLI
RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg && \
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null && \
apt update && \
apt install gh -y
# Install Docker
RUN apt-get install -y apt-transport-https ca-certificates curl software-properties-common lsb-release && \
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - && \
add-apt-repository "deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" && \
apt-get update && \
apt-get install -y docker-ce docker-ce-cli containerd.io
# Verify installations
RUN rustc --version && \
cargo --version && \
docker --version && \
gh --version && \
node --version
# Set the default command
CMD [ "/bin/bash" ]