Skip to content

Commit

Permalink
context debug part 5
Browse files Browse the repository at this point in the history
  • Loading branch information
pirog committed Aug 18, 2023
1 parent 9cba39d commit d06a246
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 92 deletions.
178 changes: 89 additions & 89 deletions examples/l337/.lando.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,96 +24,96 @@ services:
- 80

# image features
image-1:
api: 4
working_dir: /tmp
image: nginx:1.21
environment:
PIKE: MOUNT
image-2:
api: 4
working_dir: /tmp
image: ./images/nginx/Dockerfile
image-3:
api: 4
working_dir: /tmp
image: |
# test weird indentation and casing
FROM nginx:1.20
ENV SPOCK NIMOY
ENV TEST THIS
copy file1 /file1
COPY file1 /file4
image-4:
api: 4
working_dir: /tmp
image:
imagefile: nginx:1.21
image-5:
api: 4
working_dir: /tmp
image:
imagefile: ./images/nginx/Dockerfile
image-6:
api: 4
working_dir: /tmp
image:
imagefile: |
FROM nginx:1.21
ENV SPOCK NIMOY
# image-1:
# api: 4
# working_dir: /tmp
# image: nginx:1.21
# environment:
# PIKE: MOUNT
# image-2:
# api: 4
# working_dir: /tmp
# image: ./images/nginx/Dockerfile
# image-3:
# api: 4
# working_dir: /tmp
# image: |
# # test weird indentation and casing
# FROM nginx:1.20
# ENV SPOCK NIMOY
# ENV TEST THIS
# copy file1 /file1
# COPY file1 /file4
# image-4:
# api: 4
# working_dir: /tmp
# image:
# imagefile: nginx:1.21
# image-5:
# api: 4
# working_dir: /tmp
# image:
# imagefile: ./images/nginx/Dockerfile
# image-6:
# api: 4
# working_dir: /tmp
# image:
# imagefile: |
# FROM nginx:1.21
# ENV SPOCK NIMOY

# context features
context-1:
api: 4
working_dir: /tmp
image:
imagefile: |
FROM nginx:1.21
RUN useradd eddie-teach
context:
# COPY ./folder to /folder
- ./folder
# COPY ./folder to /thing
- ./folder:thing
# COPY file1 to /file2
- file1:/file2
# COPY file1 to /file3
- src: file1
dest: file3
# COPY file1 to /file4
- source: file1
destination: /tmp/file4
# COPY file1 to /file4 with instruction overrides
- source: file1
destination: file4
instructions: COPY /file4 /tmp/stuff/file5
- source: file1
destination: file4
instructions: |
COPY /file4 /file6
ENV HALL OATES
# COPY ./images/Dockerfile to /images/nginx/Dockerfile
- source: ./images/nginx/Dockerfile
# COPY file1 to /file6 and set ownership to nginx:nginx
- source: file1
destination: /file7
owner: nginx:nginx
# COPY file1 to /file7 and set ownership to nginx:nginx
- source: file1
destination: file8
user: nginx
group: nginx
- source: file1
destination: file9
user: nginx
# ADD HeresAHealthToTheCompany.json
# to /SeaShanties/lyrics/main/shanties/HeresAHealthToTheCompany.json
- source: https://raw.githubusercontent.com/SeaShanties/lyrics/main/shanties/HeresAHealthToTheCompany.json
# ADD available-shanties.json
# to /etc/config/available-shanties.json and set ownership to blackbeard
- source: https://raw.githubusercontent.com/SeaShanties/lyrics/main/available-shanties.json
dest: /etc/config/available-shanties.json
owner: eddie-teach
# # context features
# context-1:
# api: 4
# working_dir: /tmp
# image:
# imagefile: |
# FROM nginx:1.21
# RUN useradd eddie-teach
# context:
# # COPY ./folder to /folder
# - ./folder
# # COPY ./folder to /thing
# - ./folder:thing
# # COPY file1 to /file2
# - file1:/file2
# # COPY file1 to /file3
# - src: file1
# dest: file3
# # COPY file1 to /file4
# - source: file1
# destination: /tmp/file4
# # COPY file1 to /file4 with instruction overrides
# - source: file1
# destination: file4
# instructions: COPY /file4 /tmp/stuff/file5
# - source: file1
# destination: file4
# instructions: |
# COPY /file4 /file6
# ENV HALL OATES
# # COPY ./images/Dockerfile to /images/nginx/Dockerfile
# - source: ./images/nginx/Dockerfile
# # COPY file1 to /file6 and set ownership to nginx:nginx
# - source: file1
# destination: /file7
# owner: nginx:nginx
# # COPY file1 to /file7 and set ownership to nginx:nginx
# - source: file1
# destination: file8
# user: nginx
# group: nginx
# - source: file1
# destination: file9
# user: nginx
# # ADD HeresAHealthToTheCompany.json
# # to /SeaShanties/lyrics/main/shanties/HeresAHealthToTheCompany.json
# - source: https://raw.githubusercontent.com/SeaShanties/lyrics/main/shanties/HeresAHealthToTheCompany.json
# # ADD available-shanties.json
# # to /etc/config/available-shanties.json and set ownership to blackbeard
# - source: https://raw.githubusercontent.com/SeaShanties/lyrics/main/available-shanties.json
# dest: /etc/config/available-shanties.json
# owner: eddie-teach

networks:
my-network:
Expand Down
2 changes: 1 addition & 1 deletion examples/l337/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Start up tests
```bash
# should start successfully
lando poweroff
DOCKER_BUILDKIT=0 lando start -vvv
lando start
```

Verification commands
Expand Down
4 changes: 2 additions & 2 deletions plugins/lando-services-v4/lib/docker-engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,9 @@ class DockerEngine extends Dockerode {
// call the parent
// @TODO: consider other opts? https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageBuild
// args?
this.debug('building image %o with %o', tag, fs.readdirSync(context));
super.buildImage({context, src: fs.readdirSync(context)}, {forcerm: true, t: tag}, callbackHandler);
// log
this.debug('building image %o from %o', tag, context);

// make this a hybrid async func and return
return mergePromise(builder, promiseHandler);
}
Expand Down

0 comments on commit d06a246

Please sign in to comment.