Skip to content

Commit 7544ddf

Browse files
committed
Forked from dark-next dockerfile repo
1 parent 447cd3d commit 7544ddf

File tree

5 files changed

+33
-17
lines changed

5 files changed

+33
-17
lines changed

.circleci/config.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,15 @@ jobs:
55
machine:
66
image: ubuntu-2204:current
77
environment:
8-
TAG: darklang/dark-base
8+
TAG: darklang/dark-classic-base
99
steps:
1010
- checkout
1111
- run: echo "Building images for version $(./tag-version.sh)."
12-
- run: docker buildx build --target dark-base -t $TAG:$(./tag-version.sh) .
12+
- run: docker buildx build --target dark-classic-base -t $TAG:$(./tag-version.sh) .
1313
- deploy:
1414
name: Push image
1515
command: |
1616
if [ "${CIRCLE_BRANCH}" == "main" ]; then
17-
docker login --username pbiggar --password "${DOCKER_HUB_TOKEN}"
17+
echo "${DOCKER_HUB_TOKEN}" | docker login --username stachudotnet --password-stdin
1818
docker push $TAG:$(./tag-version.sh)
1919
fi
20-
21-

Dockerfile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
# change.
2020

2121

22-
FROM ubuntu:22.04 as dark-base
22+
FROM ubuntu:22.04 AS dark-classic-base
2323

24-
ENV FORCE_BUILD 3
24+
ENV FORCE_BUILD=9
2525

2626
# Creates variables to allow builds to work on both amd64 and arm64
2727
ARG TARGETARCH
@@ -175,9 +175,9 @@ RUN mkdir -p bin
175175
# Locales
176176
############################
177177
RUN sudo locale-gen "en_US.UTF-8"
178-
ENV LANGUAGE en_US.UTF-8
179-
ENV LANG en_US.UTF-8
180-
ENV LC_ALL en_US.UTF-8
178+
ENV LANGUAGE=en_US.UTF-8
179+
ENV LANG=en_US.UTF-8
180+
ENV LC_ALL=en_US.UTF-8
181181

182182
############################
183183
# Frontend
@@ -367,7 +367,7 @@ RUN sudo pip3 install -U --no-cache-dir -U crcmod \
367367
# Pip packages
368368
############################
369369
RUN sudo pip3 install --no-cache-dir yq yamllint watchfiles yapf==0.32.0
370-
ENV PATH "$PATH:/home/dark/.local/bin"
370+
ENV PATH="$PATH:/home/dark/.local/bin"
371371

372372
####################################
373373
# CircleCI
@@ -472,7 +472,7 @@ RUN sudo dotnet workload install wasm-tools
472472

473473
# formatting
474474
RUN dotnet tool install fantomas-tool --version 4.7.9 -g
475-
ENV PATH "$PATH:/home/dark/bin:/home/dark/.dotnet/tools"
475+
ENV PATH="$PATH:/home/dark/bin:/home/dark/.dotnet/tools"
476476

477477
#############
478478
# tunnel user

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
# dockerfile
1+
# classic-dockerfile
2+
23
Build our docker container
34

45
# Purpose
56

6-
As a first step to our build in darklang/dark, we need to build the container,
7+
As a first step to our build in darklang-classic, we need to build the container,
78
and save it for future steps by pushing it to a repo. However, we do not want
89
to share the keys to push to the docker container publicly (obviously). The
910
solution was making a separate repo and not sharing the keys from it.
@@ -14,6 +15,9 @@ If you update this repo and push, the tag(s) will be automatically derived from
1415
the current git hash - see `tag-version.sh`.
1516

1617
To use in CI, you'll then go to the darklang/dark repo's `.circleci/config.yaml`
17-
and update `.executors | .[] | .docker.image` for the `in-container`
18-
executor.
18+
and update `.executors.in-container.docker[0].image`
19+
20+
The `./build` script is included in case you need to build a docker image locally.
1921

22+
If there are changes upstream (in the dark-classic repo), you can copy them here
23+
with `./clone-from-dark-repo.sh`.

build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ gid="$(id -g)"
99
# Below is max($gid, 1000); on OS X, the user's group might be staff, with
1010
# gid=20, which conflicts with ubuntu group dialout.
1111
gid=$((gid > 1000 ? gid : 1000))
12-
docker build -t dark --build-arg uid="$(id -u)" --build-arg gid="$gid" .
12+
docker build -t dark-classic --build-arg uid="$(id -u)" --build-arg gid="$gid" .
1313

clone-from-dark-repo.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env bash
2+
3+
# run like
4+
# ./clone-from-dark-repo.sh "../classic-dark"
5+
6+
set -euo pipefail
7+
8+
set -x
9+
10+
dir=$1
11+
12+
mkdir -p scripts/installers
13+
14+
cp "$dir"/Dockerfile ./

0 commit comments

Comments
 (0)