Skip to content

Commit d7e2031

Browse files
committed
Add dockerignore. Re-add old-stuff
1 parent 677748f commit d7e2031

3 files changed

Lines changed: 10 additions & 2 deletions

File tree

ansible/roles/builder/tasks/main.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,13 @@
5151
src: "{{ dockerfile }}"
5252
dest: "{{ build_dir }}/{{ name }}"
5353

54+
- name: copy .dockerignore file into build folder
55+
tags: deploy
56+
become: true
57+
template:
58+
src: ".dockerignore"
59+
dest: "{{ build_dir }}/{{ name }}"
60+
5461
- name: copy secrets into build dir
5562
tags: [ deploy ]
5663
become: true
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.git

ansible/roles/builder/templates/basic_node/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@ WORKDIR /{{ name }}
4242
RUN npm install --production
4343

4444
# move the current build context (`.` is the repo) to /{{ name }}
45-
ADD ./repo ./
46-
RUN rm -rf ./.git
45+
ADD ./repo /{{ name }}
4746

4847
{% if dockerfile_post_install_commands is defined %}
4948
{% for command in dockerfile_post_install_commands %}
@@ -52,6 +51,7 @@ RUN {{ command }}
5251
{% endif %}
5352

5453
RUN rm /root/.ssh/id_rsa
54+
RUN rm /root/.ssh/known_hosts
5555

5656
# Define default command.
5757
CMD ulimit -c unlimited && /usr/local/bin/npm {{ npm_start_command | default('start') }}

0 commit comments

Comments
 (0)