Skip to content

Commit 68e82a6

Browse files
authored
Merge pull request #10 from codecrafters-io/CC-1291-add-go
CC-1291: add Go to all build image dockerfiles
2 parents 3892d5d + 636263a commit 68e82a6

File tree

7 files changed

+17
-1
lines changed

7 files changed

+17
-1
lines changed

dockerfiles/bun-1.1.Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
FROM oven/bun:1.1.4-alpine
22

3+
# We need to install Go to build the custom executable.
4+
RUN apk add --no-cache "go>=1.20"
5+
36
ENV CODECRAFTERS_DEPENDENCY_FILE_PATHS="package.json,bun.lockb"
47

58
WORKDIR /app

dockerfiles/c-9.2.Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
FROM n0madic/alpine-gcc:9.2.0
1+
FROM n0madic/alpine-gcc:9.2.0
2+
3+
# We need to install Go to build the custom executable.
4+
RUN apk add --no-cache "go>=1.12"

dockerfiles/cpp-23.Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ FROM gcc:13.2.0-bookworm
33

44
ENV CODECRAFTERS_DEPENDENCY_FILE_PATHS="vcpkg.json,vcpkg-configuration.json"
55

6+
# We need to install Go to build the custom executable.
67
RUN apt-get update && \
8+
apt-get install -y --no-install-recommends golang-go=2:* && \
79
apt-get install --no-install-recommends -y zip=3.* && \
810
apt-get install --no-install-recommends -y g++=4:* && \
911
apt-get install --no-install-recommends -y build-essential=12.* && \

dockerfiles/java-21.Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
FROM maven:3.9.5-eclipse-temurin-21-alpine
22

3+
# We need to install Go to build the custom executable.
4+
RUN apk add --no-cache "go>=1.20"
5+
36
COPY pom.xml /app/pom.xml
47

58
WORKDIR /app

dockerfiles/nodejs-21.Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
FROM node:21.7-alpine3.19
22

3+
# We need to install Go to build the custom executable.
4+
RUN apk add --no-cache "go>=1.20"
5+
36
ENV CODECRAFTERS_DEPENDENCY_FILE_PATHS="package.json,package-lock.json"
47

58
WORKDIR /app

dockerfiles/python-3.12.Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
FROM python:3.12-alpine
22

3+
# We need to install Go to build the custom executable.
34
RUN apk add --no-cache "go>=1.20"
45

56
RUN pip install --no-cache-dir "pipenv>=2023.12.1"

dockerfiles/rust-1.77.Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
FROM rust:1.77-buster
22

3+
# We need to install Go to build the custom executable.
34
RUN apt-get update && apt-get install -y --no-install-recommends golang-go=2:* && rm -rf /var/lib/apt/lists/*
45

56
COPY Cargo.toml /app/Cargo.toml

0 commit comments

Comments
 (0)