Update Dockerfile handling to keep parser directives at the top
Signed-off-by: CrazyMax <google@crazymax.dev>
This commit is contained in:
17
testdata/expected/file2.Dockerfile
vendored
Normal file
17
testdata/expected/file2.Dockerfile
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
# syntax=docker/dockerfile:1.3
|
||||
# Copyright 2018 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
FROM scratch
|
||||
CMD ["echo", "hello world"]
|
||||
18
testdata/expected/file3.Dockerfile
vendored
Normal file
18
testdata/expected/file3.Dockerfile
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
# escape=`
|
||||
# Copyright 2018 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
FROM microsoft/nanoserver
|
||||
COPY testfile.txt c:\
|
||||
RUN dir c:\
|
||||
3
testdata/initial/file2.Dockerfile
vendored
Normal file
3
testdata/initial/file2.Dockerfile
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
# syntax=docker/dockerfile:1.3
|
||||
FROM scratch
|
||||
CMD ["echo", "hello world"]
|
||||
4
testdata/initial/file3.Dockerfile
vendored
Normal file
4
testdata/initial/file3.Dockerfile
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
# escape=`
|
||||
FROM microsoft/nanoserver
|
||||
COPY testfile.txt c:\
|
||||
RUN dir c:\
|
||||
Reference in New Issue
Block a user