Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Apr 28, 2020. It is now read-only.

Commit eeaae6e

Browse files
author
Nathan Potter
authored
Add buildbase.sh script to simplify initializing base images (#233)
1 parent 9a5a66b commit eeaae6e

File tree

3 files changed

+19
-10
lines changed

3 files changed

+19
-10
lines changed

images/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,7 @@ extensions or tooling.
5858

5959
`buildpush.sh` - This script takes an image name, i.e. `ubuntu-dev-go1.12`, changes into the specified directory,
6060
and calls `buildlang.sh` and `push.sh` to build the language image and push the finalized image to the codercom
61-
docker hub.
61+
docker hub.
62+
63+
`buildbase.sh` - This script builds both of the base images and is run via `main.sh` or should be run before
64+
doing a `buildpush.sh` for a specific language.

images/buildbase.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
set -eu
3+
4+
BASE_IMAGE=ubuntu-dev
5+
6+
# Build the base for all images.
7+
pushd base
8+
docker build -t sail-base --label com.coder.sail.base_image=sail-base .
9+
popd
10+
11+
# Build our base ubuntu-dev image for non language specific environments.
12+
pushd $BASE_IMAGE
13+
./buildpush.sh
14+
popd

images/main.sh

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#!/bin/bash
22
set -eu
33

4-
BASE_IMAGE=ubuntu-dev
54

65
LANG_IMAGES=(
76
ubuntu-dev-gcc8
@@ -14,15 +13,8 @@ LANG_IMAGES=(
1413
ubuntu-dev-ruby2.6
1514
)
1615

17-
# Build the base for all images.
18-
pushd base
19-
docker build -t sail-base --label com.coder.sail.base_image=sail-base .
20-
popd
16+
./buildbase.sh
2117

22-
# Build our base ubuntu-dev image for non language specific environments.
23-
pushd $BASE_IMAGE
24-
./buildpush.sh
25-
popd
2618

2719
# Build all our language specific environments.
2820
for lang in "${LANG_IMAGES[@]}"; do

0 commit comments

Comments
 (0)